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

Vishal Jain cse.vishal at gmail.com
Thu Oct 14 03:24:58 PDT 2010


In a way similar to speexclient voip example, I want to have a voip
application where 3 or more users can interact. This creates the following
problems "1. How to playback 2 or more audio streams such that they appear
overlayed (parallel)". The audio streams are speex encoded.

I have few approaches in mind.

1. Create multiple decoder states and multiple ALSA audio playback device.
But if I do this in the same thread, voice will appear sequential (slightly
displaced in time) rather than overlayed. This issue will get more deep as
the number of users increase. Moreover creating multiple OS threads will
also not solve the issue due to latency issues.

2. Use multiple channels in decoder but not sure how this can be done.

3. Using intermediate server to merge/overlay multiple speex audio streams
encoded at same sampling rate. I can't find an appropriate
function/algorithm in speex code to do so.

Please suggest an appropriate solution.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20101014/174cdc40/attachment.htm 

More information about the Speex-dev mailing list