diff options
-rw-r--r-- | audio/mixer.cpp | 2 | ||||
-rw-r--r-- | audio/mixer_intern.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/audio/mixer.cpp b/audio/mixer.cpp index 3482bd30c9..fb4fffb8d8 100644 --- a/audio/mixer.cpp +++ b/audio/mixer.cpp @@ -257,6 +257,8 @@ int MixerImpl::mixCallback(byte *samples, uint len) { Common::StackLock lock(_mutex); int16 *buf = (int16 *)samples; + // we store stereo, 16-bit samples + assert(len % 4 == 0); len >>= 2; // Since the mixer callback has been called, the mixer must be ready... diff --git a/audio/mixer_intern.h b/audio/mixer_intern.h index 05e519c64c..a04eb55c5b 100644 --- a/audio/mixer_intern.h +++ b/audio/mixer_intern.h @@ -126,6 +126,8 @@ public: * the backend (e.g. from an audio mixing thread). All the actual mixing * work is done from here. * + * @param samples Sample buffer, in which stereo 16-bit samples will be stored. + * @param len Length of the provided buffer to fill (in bytes, should be divisible by 4). * @return number of sample pairs processed (which can still be silence!) */ int mixCallback(byte *samples, uint len); |