Advertisement

SDL_Audio, questions about the format of the stream

Started by June 14, 2014 06:06 AM
0 comments, last by JoshuaWaring 10 years, 5 months ago

Let's say I've set my stream to be signed 16 bit numbers, with 2 channels, would this mean that the stream that I'm populating is set up so that the first 16 bits will be the left channel and then the following 16 bits will be the right and the collection of 32 bits is the sample?

[L - 16][R - 16][L - 16][R - 16]
[ Sample - 32 ][ Sample - 32 ]

Thank you for any help :)

I found the answer here: http://wiki.libsdl.org/SDL_AudioSpec

"Channel data is interleaved. Stereo samples are stored in left/right ordering. Quad is stored in front-left/front-right/rear-left/rear-right order. 5.1 is stored in front-left/front-right/center/low-freq/rear-left/rear-right ordering ("low-freq" is the ".1" speaker)."

This topic is closed to new replies.

Advertisement