How to attach second audio device?

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

 



Hi,

The 'passive port' term in conference bridge means conference bridge
won't call get/put_frame() of the port, it is useful for port that has
its own clock to call get/put_frame(), e.g: sound device port and
master port. So in this case, your application doesn't really need to
call get/put_frame() manually, since the sound device port will do.
Here is a bit more detail on the implementation, all you need to do is
adding your second sound device (and so on) to the conf bridge as
passive port, the conf bridge will return a pointer to pjmedia_port
here, then just connect the 'just added' sound device to that pjmedia
port using snd_port_connect(). Then your app can do connecting "legs"
using conf_connect/disconnect_port() as usual. That's all.

Another alternative is using splitcomb port with reversed channel.
However the passive port trick should be simpler.

Regards,
nanang


On Fri, Jan 30, 2009 at 2:13 PM, Michael <michael_zurich at yahoo.com> wrote:
> Hi
>
> I'm looking for a possibility to have some calls on the headset and some on
> the loudspeakers. So both devices are attached to the bridge and the
> application does switch by connecting the "legs", like to a null-device or
> ringback....
>
> I speak and hear over head set and now in the middle of the talk I want to
> give the sound on the loudspeakers that the crowd in the office can hear
> it... and then I switch back to headset only. For this I need second device.
> I think it should be an active port (pjmedia_conf_add_port) as I do not want
> to do the put_frame() manually.
>
> Michael.
>
> --- On Thu, 1/29/09, Nanang Izzuddin <nanang at pjsip.org> wrote:
>
> From: Nanang Izzuddin <nanang@xxxxxxxxx>
> Subject: Re: How to attach second audio device?
> To: "pjsip list" <pjsip at lists.pjsip.org>
> Date: Thursday, January 29, 2009, 8:23 PM
>
> Hi,
>
> I guess the second sound device (and so on) can be added to conference
> bridge using pjmedia_conf_add_passive_port().
>
> Regards,
> nanang
>
>
> On Thu, Jan 29, 2009 at 10:57 PM, Michael <michael_zurich at yahoo.com>
> wrote:
>> Hi
>>
>> I want to attach second audio device to conference bridge.
>> Device 1 headset, device 2 loudspeakers.
>>
>> I tried:
>>
>> // create sound port
>> status = pjmedia_snd_port_create(pjsua_var.pool, rec_id2, play_id2,
>> clock_rate, channel_count, samples_per_frame, bits_per_sample, 0,
>> &snd_port);
>>
>> // connect sound port to media port
>> status = pjmedia_snd_port_connect( snd_port, media_port );
>>
>> // connect media port to conference bridge
>> status =
>  pjmedia_conf_add_port(pjsua_var.mconf, pjsua_var.pool,
> media_port,
>> NULL, NULL);
>>
>> But how to create a second media port?
>> status = pjmedia_null_port_create(pjsua_var.pool, clock_rate,
> channel_count,
>> samples_per_frame, bits_per_sample, &media_port);
>>
>> does not work...
>>
>> Any idea?
>>
>> Michael.
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> 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