[Freeswitch-dev] How audio mixing works in Freeswitch conference?

Michael Jerris mike at jerris.com
Mon May 15 19:23:00 MSD 2017


> On May 10, 2017, at 6:43 PM, kaiduan xie <kaiduanx at yahoo.ca> wrote:
> 
> Thanks Michael and Moises.
> 
> Is frame synchronisation important when mixing frames from different sources?

It’s complicated to answer, but yes it is… in some situations at least… if doing video too, those need to be in sync.  Using video or not you need to handle where different clock sources can be sending at slightly different rates (or have a different reference for what a rate is)… that case will give you underflow, or overflow in reference to each other.. underflow you might be able to get away with just silence for a frame or partial frame, overflow you need to do something with or a buffer will fill.  There are multiple approaches to deal with this. All of the approaches end up with a balance trying to have the effect barely perceivable, but still effective.  Trimming out packets that are silence (effectively shortening the silence periods) is one way for example… a much more expensive way that has even better sound results would be to insert or remove individual samples (requires some approach to keep things in phase)… On video you have similar issues where you might want to drop or “freeze” for a frame…  Lots of research on the best ways to do this.

> 
> /Kaiduan
> 
> 
> 
> On Wednesday, May 10, 2017 12:15 PM, Moises Silva <moises.silva at gmail.com> wrote:
> 
> 
> On Thu, May 4, 2017 at 1:36 PM, Michael Jerris <mike at jerris.com <mailto:mike at jerris.com>> wrote:
> you add signed linear samples together.
> 
>> On Apr 12, 2017, at 10:05 AM, kaiduan xie <kaiduanx at yahoo.ca <mailto:kaiduanx at yahoo.ca>> wrote:
>> 
>> Hi,
>> 
>> Can anyone explain how audio mixing works in Freeswitch audio conference and where is the source code?
>> 
>> Thanks a lot in advance,
>> 
>> /Kaiduan
> 
> 
> And to be more precise and answer your second question:
> 
> https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/mod/applications/mod_conference/mod_conference.c?at=f691d139eab#576 <https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/mod/applications/mod_conference/mod_conference.c?at=f691d139eab#576>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20170515/573cce37/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-dev mailing list