<div>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 grow.</div>
<div><br></div><div>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.</div>
<div><br></div><div>-Steve</div><div><br></div><div><br></div><br><br><div class="gmail_quote">On 13 December 2012 23:07, Rick van Rein <span dir="ltr"><<a href="mailto:rick@openfortress.nl" target="_blank">rick@openfortress.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<div class="im"><br>
> the difficult part is how to figure out if someone is looked at<br>
> someone?<br>
<br>
</div>Assuming that they delivered stereo microphone sound, which is a stretch in<br>
today's setups (a chicken-egg problem) it would be trivial I think. You<br>
would basically do a calculation like<br>
<br>
tan (alpha) = (R - L) / 0.5 * (R + L)<br>
<br>
and find in alpha the angle right from straight-forward. Of course it is<br>
useful to dampen movements with a low-pass filter on momentary calculations,<br>
and/or to make these calculations over periods rather than for each<br>
individual audio sample pair.<br>
<br>
If the switch is aware what person is put in what position it could figure<br>
out which other is addressed. That might call for a switch that does this<br>
work separately for each participant.<br>
<br>
I suppose it would be practical to imagine conference partners sitting in a<br>
circle. N persons would be spread with 360 degrees / N apart. If they<br>
spoke out under an angle alpha, than their i'th neighbour would hear the<br>
sound at an angle (alpha + i*360/N degrees). And that angle would be used<br>
in the opposite way as the tangent-formula above.<br>
<br>
Sorry about the maths... I think it helps to clarify the approach though.<br>
If you'd like me to, I could try to find an elegant and *practical* way of<br>
modelling this with a simple matrix operation. Let me know if you'd like<br>
me to contribute that. It'd mean that mixing inputs and forming outputs<br>
from them is a nice operation with 2N inputs and 2N outputs with all the<br>
above isolated into a series of multiplications and additions. Of the sort<br>
that would easily be met in hardware optimisations, if present.<br>
<br>
I'm sure that hardware vendors won't mind adding a layer of luxoury models<br>
for telephony... certainly not for business applications where they money<br>
is available... but AFAIK there are no stereo switches yet. Imagine a<br>
good-quality codec (screwing ISDN, embracing OPUS) and the advantages of<br>
stereo communication, we could have a good laugh at all those people who<br>
still think 3000 Hz, audio-only and IPv4 define the VoIP arena.<br>
<br>
<br>
Cheers,<br>
<div class="HOEnZb"><div class="h5"> -Rick<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>