11
edits
| Line 1,488: | Line 1,488: | ||
Interleave orders are fixed. Which configurations are supported depends on both the physical configuration and the underlying implementation. There is one exception: | Interleave orders are fixed. Which configurations are supported depends on both the physical configuration and the underlying implementation. There is one exception: | ||
NPAudioChannelStereo will always be supported. | NPAudioChannelStereo will always be supported. | ||
<pre> | |||
+-----+ | |||
front | ch0 | | |||
+-----+ | |||
+----------+ | |||
| listener | | |||
+----------+ | |||
</pre> | |||
If the physical speaker arrangement is multi-channel, 1 channel output will pick the front center speaker if one is present. If no front center speaker is available, 1 channel output will occur on both the front left and front right speakers. For audio output, NPAudioChannelStereo will always be available to the application, regardless of physical speaker configuration. | |||
Sample buffer format: | |||
<pre> | |||
+-----+-----+-----+ | |||
| ch0 | ch0 | ch0 | ... | |||
+-----+-----+-----+ | |||
<-----> single sample frame | |||
</pre> | |||
'''Format NPAudioChannelStereo''' | |||
<pre> | |||
front +-----+ +-----+ front | |||
left | ch0 | | ch1 | right | |||
(L) +-----+ +-----+ (R) | |||
+----------+ | |||
| listener | | |||
+----------+ | |||
</pre> | |||
If the physical speaker arrangement is mono, ch0 and ch1 will be combined and output on the mono speaker. For audio output, NPAudioChannelStereo will always be availabe to the application, regardless of physical speaker configuration. | |||
Sample buffer interleave order is L, R: | |||
<pre> | |||
+------+------+------+------+ | |||
| ch0 | ch1 | ch0 | ch1 | ... | |||
+------+------+------+------+ | |||
sample sample | |||
<- frame 0 -> <- frame 1 -> | |||
</pre> | |||
'''Format NPAudioChannelThree''' | |||
<pre> | |||
front | |||
center (C) | |||
front +-----+ +-----+ +-----+ front | |||
left | ch0 | | ch2 | | ch1 | right | |||
(L) +-----+ +-----+ +-----+ (R) | |||
+----------+ | |||
| listener | | |||
+----------+ | |||
</pre> | |||
Sample buffer interleave order is L, R, C: | |||
<pre> | |||
+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch0 | ch1 | ch2 | ... | |||
+------+------+------+------+------+------+ | |||
<- sample frame 0 -> <- sample frame 1 -> | |||
</pre> | |||
'''Format NPAudioChannelFour''' | |||
<pre> | |||
front +-----+ +-----+ front | |||
left | ch0 | | ch1 | right | |||
(L) +-----+ +-----+ (R) | |||
+----------+ | |||
| listener | | |||
+----------+ | |||
+-----+ +-----+ | |||
| ch2 | | ch3 | | |||
left +-----+ +-----+ right | |||
back (Lb) back (Rb) | |||
</pre> | |||
Sample buffer interleave order is L, R, Lb, Rb: | |||
<pre> | |||
+------+------+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch3 | ch4 | ch0 | ch1 | ch2 | ... | |||
+------+------+------+------+------+------+------+------+ | |||
<--- sample frame 0 ---> <--- sample frame 1... | |||
</pre> | |||
'''Format NPAudioChannelFive''' | |||
<pre> | |||
front | |||
center (C) | |||
front +-----+ +-----+ +-----+ front | |||
left | ch0 | | ch2 | | ch1 | right | |||
(L) +-----+ +-----+ +-----+ (R) | |||
+----------+ | |||
| listener | | |||
+-----+ +----------+ +-----+ | |||
| ch3 | | ch4 | | |||
left +-----+ +-----+ right | |||
surround (Ls) surround (Rs) | |||
</pre> | |||
Sample buffer interleave order is L, R, C, Ls, Rs: | |||
<pre> | |||
+------+------+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch3 | ch4 | ch0 | ch1 | ch2 | ... | |||
+------+------+------+------+------+------+------+------+ | |||
<--- sample frame 0 ---> <--- sample frame 1... | |||
</pre> | |||
'''Format NPAudioChannelFiveLFE''' | |||
<pre> | |||
front | |||
center (C) | |||
front +-----+ +-----+ +-----+ front +-----+ | |||
left | ch0 | | ch2 | | ch1 | right | ch3 | subwoofer (LFE) | |||
(L) +-----+ +-----+ +-----+ (R) +-----+ | |||
+----------+ | |||
| listener | | |||
+-----+ +----------+ +-----+ | |||
| ch4 | | ch5 | | |||
left +-----+ +-----+ right | |||
surround (Ls) surround (Rs) | |||
</pre> | |||
Sample buffer interleave order is L, R, C, LFE, Ls, Rs: | |||
<pre> | |||
+------+------+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch3 | ch4 | ch5 | ch0 | ch1 | ... | |||
+------+------+------+------+------+------+------+------+ | |||
<--- sample frame 0 ---> <--- sample frame 1... | |||
</pre> | |||
'''Format NPAudioChannelSeven''' | |||
<pre> | |||
front | |||
center (C) | |||
front +-----+ +-----+ +-----+ front | |||
left | ch0 | | ch2 | | ch1 | right | |||
(L) +-----+ +-----+ +-----+ (R) | |||
+----------+ | |||
| listener | | |||
+-----+ +----------+ +-----+ | |||
| ch5 | | ch6 | | |||
left +-----+ +-----+ right | |||
surround surround | |||
(Ls) (Rs) | |||
</pre> | |||
Sample buffer interleave order is L, R, C, Lb, Rb, Ls, Rs: | |||
<pre> | |||
+------+------+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch3 | ch4 | ch5 | ch6 | ch0 | ... | |||
+------+------+------+------+------+------+------+------+ | |||
<--- sample frame 0 ---> <--- sample frame 1... | |||
</pre> | |||
'''Format NPAudioChannelSevenLFE''' | |||
<pre> | |||
front | |||
center (C) | |||
front +-----+ +-----+ +-----+ front +-----+ | |||
left | ch0 | | ch2 | | ch1 | right | ch3 | subwoofer (LFE) | |||
(L) +-----+ +-----+ +-----+ (R) +-----+ | |||
+----------+ | |||
| listener | | |||
+-----+ +----------+ +-----+ | |||
| ch4 | | ch5 | | |||
left +-----+ +-----+ right | |||
surround surround | |||
(Ls) (Rs) | |||
</pre> | |||
Sample buffer interleave order is L, R, C, LFE, Lb, Rb, Ls, Rs: | |||
<pre> | |||
+------+------+------+------+------+------+------+------+ | |||
| ch0 | ch1 | ch2 | ch3 | ch4 | ch5 | ch6 | ch7 | ... | |||
+------+------+------+------+------+------+------+------+ | |||
<--- sample frame 0 ---> <--- sample frame 1... | |||
</pre> | |||
===Appendix F - Multi-Channel Input Formats=== | |||
:Interleave orders are fixed. | |||
:Format NPAudioChannelMono - input is mono microphone input | |||
:Format NPAudioChannelStereo - input is stereo line in. Interleave order same as Appendix E. | |||
:Format NPAudioChannelFive - input is SPDIF. Interleave order same as Appendix E. | |||
:Format NPAudioChannelFiveOne - input is SPDIF. Interleave order same as Appendix E. | |||
:Format NPAudioChannelSeven - input is SPDIF. Interleave order same as Appendix E. | |||
:Format NPAudioChannelSevenOne - input is SPDIF. Interleave order same as Appendix E. | |||
===Appendix G - Contributers=== | |||
<table> | |||
<tr><td>Andrew Scherkus</td><td>scherkus@google.com</td></tr> | |||
<tr><td>Brad Chen</td><td>bradchen@google.com</td></tr> | |||
<tr><td>Carlos Pizano</td><td>cpu@google.com</td></tr> | |||
<tr><td>Chris Rogers</td><td>crogers@google.com</td></tr> | |||
<tr><td>Darin Fisher</td><td>darin@google.com</td></tr> | |||
<tr><td>David Sehr</td><td>sehr@google.com</td></tr> | |||
<tr><td>Dominic Mazzoni</td><td>dmazzoni@google.com</td></tr> | |||
<tr><td>Ian Lewis</td><td>ilewis@google.com</td></tr> | |||
<tr><td>Nicholas Fullagar</td><td>nfullagar@google.com</td></tr> | |||
<tr><td>Stewart Miles</td><td>smiles@google.com</td></tr></table> | |||
edits