pjsua stereo demo

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

 



Hi there,
I am trying to use the stereo demo incorporated in the pjsua application..
(pjsip 1.8.10  on windows XP). In my application I need to be able to use
one sound device for 2 different simultaneous calls.
When I enable the stereo demo the ports show up in the app as connected to
the conference bridge, as below:

Conference ports:
Port #00[16KHz/20ms/2]         Master/sound  transmitting to:
Port #01[16KHz/40ms/1]            scomb-rev  transmitting to:
Port #02[16KHz/20ms/2]             ringback  transmitting to:
Port #03[16KHz/20ms/2]                 ring  transmitting to:


But calls still works as normal in stereo and only when call is bridged to
port 0 ( my sound device)
trying to use port 1 does nothing.

I ve also tried implementing the stereo demo differently by doing the
following:

creating splitter/combiner, the create left and right channel.:

    status = pjmedia_splitcomb_create(app_config.pool,
                      conf->info.clock_rate /* clock rate */,
                      2        /* stereo */,
                      2 * conf->info.samples_per_frame,
                      conf->info.bits_per_sample,
                      0        /* options */,
                      &app_config.sc);
    pj_assert(status == PJ_SUCCESS);

    status = pjmedia_splitcomb_create_rev_channel(app_config.pool,
                          app_config.sc,
                          0  /* ch1 */,
                          0  /* options */,
                          &mediaPortLeftChannel);
    pj_assert(status == PJ_SUCCESS);

    status = pjmedia_splitcomb_create_rev_channel(app_config.pool,
                          app_config.sc,
                          1  /* ch1 */,
                          0  /* options */,
                          &mediaPortRightChannel);
    pj_assert(status == PJ_SUCCESS);


then I connect the splitter/combined and the left right channels to the
conference bridge:


    status = pjsua_conf_add_port(app_config.pool, mediaPortLeftChannel,
                 &leftChannelConfPort);
    pj_assert(status == PJ_SUCCESS);

    status = pjsua_conf_add_port(app_config.pool, mediaPortRightChannel,
                 &rightChannelConfPort);
    pj_assert(status == PJ_SUCCESS);

    status = pjsua_conf_add_port(app_config.pool, app_config.sc,
                 &splitterConfPort);
    pj_assert(status == PJ_SUCCESS);

create sound device again:


    status = pjmedia_snd_port_create(app_config.pool, -1, -1,
                     conf->info.clock_rate,
                     2        /* stereo */,
                     2 * conf->info.samples_per_frame,
                     conf->info.bits_per_sample,
                     0, &app_config.snd);
    pj_assert(status == PJ_SUCCESS);



This way does not work either, the ports show up in the conference bridge
but no audio is playing when i connect calls.

any example on how to implement the stereo splitter correctly..
regards

Gideon Spreeth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110308/21c0694d/attachment.html>


[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