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

Vishal Jain cse.vishal at gmail.com
Thu Oct 14 07:07:49 PDT 2010


Another approach that I have come across is to decode all speex audio
streams and add their 16 bit signed PCM values clipping values above 2^15-1
and below -2^15. Is this a reliable appproach?

On Thu, Oct 14, 2010 at 3:54 PM, Vishal Jain <cse.vishal at gmail.com> wrote:

> Hello,
>
> 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.
>
> Regards,
> Vishal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20101014/7faf5b35/attachment.htm 


More information about the Speex-dev mailing list