[Speex-dev] how to play multiple speex audio streams simultaneously

Anton Shpakovsky anton.shpakovsky at gmail.com
Thu Oct 14 04:13:56 PDT 2010


Hello Vishal,

Do not even think of playing each stream in separate thread! :) That's not
the way.
Yes, you will have to create multiply decoder instances for each audio
stream. And you will have to create one playback device.
Your application should have one playback thread where you'll iterate over
the streams (e.g. data can be stored in stl container) and "mix it by hand".
Just google mixing audio stream, it's pretty easy.
I can't provide you with the exact code but the main idea of mixing is -
"sum all data to one float buffer".

Regards,
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20101014/2e9cc613/attachment.htm 


More information about the Speex-dev mailing list