ref: f8d9fe871304f06ac4b85115e8d15d3c2c1d4d1d
parent: 05a089c892a6d298b26f353adcdb3a0581767f48
author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
date: Tue Aug 9 11:03:12 EDT 2011
updated Ogg header comment
--- a/src/opus_header.c
+++ b/src/opus_header.c
@@ -5,18 +5,24 @@
/* Header contents:
- "OpusHead" (64 bits)
- version number (8 bits)
- - Sampling rate (32 bits)
- - multistream (8bits, 0=single stream (mono/stereo) 1=multistream, 2..255: multistream with mapping)
- - Channels (8 bits)
+ - Channels C (8 bits)
- Pre-skip (16 bits)
+ - Sampling rate (32 bits)
+ - mapping (8bits, 0=single stream (mono/stereo) 1=Vorbis mapping,
+ 2..254: reserved, 255: multistream with no mapping)
- if (multistream)
- - N = number of streams (8 bits)
- - N times:
- - stereo flag (8 bits, 0=mono, 1=stereo)
- - channel for left (8 bits)
- - if stereo:
- - channel for right (8 bits)
+ - if (mapping != 0)
+ - N = totel number of streams (8 bits)
+ - M = number of paired streams (8 bits)
+ - C times channel origin
+ - if (C<2*M)
+ - stream = byte/2
+ - if (byte&0x1)
+ - left
+ else
+ - right
+ - else
+ - stream = byte-2*M
*/
typedef struct {