pjmedia_snd_no_snd_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

PC1 is making a SIP call to PC2. PC2 is playing a wav file, the wav file
should be heard on PC1.
This is working if I write: pjsua_conf_connect(ci.conf_slot, 0);//Rx, in the
callback function: on_call_media_state(pjsua_call_id call_id).

If I instead of pjsua_conf_connect(ci.conf_slot, 0);//Rx, write:

pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
pool = pj_pool_create( &cp.factory,"app",	4000, 4000, NULL);
cont = pjsua_set_no_snd_dev();
status = pjmedia_snd_port_create_player(pool, -1, conf->info.clock_rate,
conf->info.channel_count,
						    conf->info.channel_count*PTIME*conf->info.clock_rate / 1000,
						    conf->info.bits_per_sample, 0,&snd_port_play);
status = pjmedia_snd_port_connect(snd_port_play, conf);

then it is not working, what is wrong with the code?
the returned status is PJ_SUCCESS each time. I want to do it in this way,
because the received audio, shall only be sent to the one loudspeaker, and
that part is working, it is not included here, the above code is just to
make it simple.
The function play_cb, in file sound_port.c, is called all the time, but the
frame.type is PJMEDIA_FRAME_TYPE_NONE.

I have also tried to run "stereo_demo()" from file pjsua_app.c, but there is
neither any audio.

Best regards,
Kresten Tolstrup




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux