On Jan 6, 2014, at 11:54 AM, Ralph Giles wrote:> The first entry, mapping[0], > describes front left and contains the value '0', so that speaker is the > left channel of the first coupled stream. mapping[1] is '4', so the > front centre speaker is given the first mono stream. mapping[2] is '1' > so the front right speaker gets the right channel of the first coupled > stream, and so on.Ahh, I see. Thanks for the explanation. It's sort of the opposite of what I'd expect. I'd expect mapping[stream_index] = vorbis_index, but it's actually mapping[vorbis_index] = stream_index. And so I guess that means that the interleaved audio samples you pass into opus_multistream_encode_float() should always be in Vorbis order, and mapping[] just tells the encoder how to package them in the streams? Brendan
On 2014-01-06 12:36 PM, Brendan Bolles wrote:> It's sort of the opposite of what I'd expect.It's written from the point of view of the decoder, so it seems backwards if you're thinking about encoding. It may help to think of it as opus_multistream_surround_encouder_create() returning what you have to pass to the decoder to understand the stream configuration.> And so I guess that means that the interleaved audio samples you pass into opus_multistream_encode_float() should always be in Vorbis order, and mapping[] just tells the encoder how to package them in the streams?I believe that's correct, yes. -r
On 06/01/14 06:21 PM, Ralph Giles wrote:> It's written from the point of view of the decoder, so it seems > backwards if you're thinking about encoding. It may help to think of it > as opus_multistream_surround_encouder_create() returning what you have > to pass to the decoder to understand the stream configuration.Not only that, but it's designed so that the same signal can be copied to multiple channels, while making it impossible to assign two streams to the same channel. Jean-Marc