From 7aa398a9d058c3dd4c5aec66f19d996f2e32fd5c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 18 Sep 2005 14:49:54 +0000 Subject: [PATCH] Clarify the AudioStream::readSample requirements svn-id: r18844 --- sound/audiostream.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/audiostream.h b/sound/audiostream.h index 798c77e6c7e..7096a8ec613 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -40,8 +40,13 @@ public: * a critical error occured (note: you *must* check if * this value is less than what you requested, this can * happen when the stream is fully used up). + * + * Data has to be in native endianess, 16 bit per sample, signed. * For stereo stream, buffer will be filled with interleaved - * left and right channel samples. + * left and right channel samples, starting with a left sample. + * Furthermore, the samples in the left and right are summed up. + * So if you request 4 samples from a stereo stream, you will get + * a total of two left channel and two right channel samples. */ virtual int readBuffer(int16 *buffer, const int numSamples) = 0;