Re: Stock splitcomb usage problem

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

 



Hi,

Found the issue - all is working when the media channel number is 2 (--stereo).

Rus

On Sat, 24 Feb 2018, pjsip@xxxxxxxx wrote:

>
> Greetings,
>
>  In short:
>
>  Expected: stereo_demo() plays wav file to left snd dev channel when file
> player connected to 0 slot (left) and plays to right snd dev channel when
> file connected to 1 slot (right).
>
>  Observing: stereo_demo() plays wav file to both channels when file player
> connected to 0 slot (left) and silent when file player connected to 1
> slot (right).
>
> Long:
>
>  I have Linux system with stereo sound card and mono SIP app with usual
> telephony 8000 rate. My goal is to make PJSIP open the sound card in
> stereo mode and create three mono conference ports:
>
> - mono port 0 able to play sound/call to both channels of sound card
> - mono port 1 able to play sound/call to left channel of sound card
> - mono port 2 able to play sound/call to right channel of sound card
>
>  I've started with stock stereo_demo() present in pjsua_app.c adding the
> simple wav player at the end of the stereo_demo() to check the things :
>
> ...
>     /* Connect the splitter to the sound device */
>     status = pjmedia_snd_port_connect(app_config.snd, app_config.sc);
>     pj_assert(status == PJ_SUCCESS);
>
>     //
>     // Custom code adds here:
>     //
>
>     // check channels with file player
>     pjmedia_port *wav_file_media_port;
>     status = pjmedia_wav_player_port_create(app_config.pool,
>       "test.wav",
>       20, // ptime
>       0, // flags
>       0, // default buffer
>       &wav_file_media_port); // returned port
>     if (status != PJ_SUCCESS) {
>       PJ_PERROR(1,(THIS_FILE, status, "pjmedia_wav_player_port_create"));
>       return;
>     }
>     pjsua_conf_port_id wav_file_slot;
>     status = pjsua_conf_add_port(app_config.pool, wav_file_media_port, &wav_file_slot);
>     if (status != PJ_SUCCESS) {
>       PJ_PERROR(1,(THIS_FILE, status, "pjsua_conf_add_port wav_file_media_port"));
>       return;
>     }
>     PJ_LOG(2,(THIS_FILE, "registered file_slot:%d", wav_file_slot));
>     pjsua_conf_connect(wav_file_slot, app_config.sc_ch1_slot); // or 0 for right ch
> ....
>
> File plays to both channels When connected to 0 slot but must play to left
> channel only. The system is silent when file player connected to app_config.sc_ch1_slot.
>
> What is the problem with stock code ? How to achieve this simple goal ?
>
> Thanks in advance
>
> Rus
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@xxxxxxxxxxxxxxx
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[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