[opus] multi stream decode
Ralph Giles
giles at thaumas.net
Tue Dec 18 09:27:12 PST 2012
On 12-12-18 8:09 AM, Audric Ackermann wrote:
> In fact, I have two mono streams, totally independent. And the user can
> select which one he wants to listen to. Is it possible to send two mono
> streams like one stereo, and to select which one to listen to in the
> client side ?
You can split the "stereo" back out, but it sounds like your application
would be better served by encoding two mono streams and sending them
with different SSRC ids in the RTP header. You could use that to select
which to play back on the client side, and remain compatible with other
implementations.
> opus_multistream_decode_float(m_decoder, data, len, decodedBuffer,
> BUFLEN, 0);
>
> But how can I know the start of the two packets ?
This will return the two streams as interleaved pairs of samples in
decodedBuffer, with channel 0 in the even-numbered indicies, just like
the data you passed in to opus_multistream_encode_float().
HTH,
-r
More information about the opus
mailing list