[Freeswitch-dev] Stereo support?

Steven Ayre steveayre at gmail.com
Fri Dec 14 14:17:54 MSK 2012

Bear in mind that doing this, you'll need to do the calculation for every
listening member. So instead of just muxing the audio for every speaker
once and broadcasting it to all members, you'll have to do that for every
single user. So much more work on the CPU, especially as your conferences

So you'd want to keep the traditional mod_conference working the way it is
now, and have any stereo support like this in something
like mod_conference_spatial (I'm guessing the code would diverge too much
to make it a single config option). It'd be a cool feature, but you'd want
it opt-in.


On 13 December 2012 23:07, Rick van Rein <rick at openfortress.nl> wrote:

> Hello,
> > the difficult part is how to figure out if someone is looked at
> > someone?
> Assuming that they delivered stereo microphone sound, which is a stretch in
> today's setups (a chicken-egg problem) it would be trivial I think.  You
> would basically do a calculation like
>         tan (alpha) = (R - L) / 0.5 * (R + L)
> and find in alpha the angle right from straight-forward.  Of course it is
> useful to dampen movements with a low-pass filter on momentary
> calculations,
> and/or to make these calculations over periods rather than for each
> individual audio sample pair.
> If the switch is aware what person is put in what position it could figure
> out which other is addressed.  That might call for a switch that does this
> work separately for each participant.
> I suppose it would be practical to imagine conference partners sitting in a
> circle.  N persons would be spread with 360 degrees / N apart.  If they
> spoke out under an angle alpha, than their i'th neighbour would hear the
> sound at an angle (alpha + i*360/N degrees).  And that angle would be used
> in the opposite way as the tangent-formula above.
> Sorry about the maths... I think it helps to clarify the approach though.
> If you'd like me to, I could try to find an elegant and *practical* way of
> modelling this with a simple matrix operation.  Let me know if you'd like
> me to contribute that.  It'd mean that mixing inputs and forming outputs
> from them is a nice operation with 2N inputs and 2N outputs with all the
> above isolated into a series of multiplications and additions.  Of the sort
> that would easily be met in hardware optimisations, if present.
> I'm sure that hardware vendors won't mind adding a layer of luxoury models
> for telephony... certainly not for business applications where they money
> is available... but AFAIK there are no stereo switches yet.  Imagine a
> good-quality codec (screwing ISDN, embracing OPUS) and the advantages of
> stereo communication, we could have a good laugh at all those people who
> still think 3000 Hz, audio-only and IPv4 define the VoIP arena.
> Cheers,
>  -Rick
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20121214/4dc90d9c/attachment.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list