diff options
author | Max Horn | 2003-09-18 16:01:33 +0000 |
---|---|---|
committer | Max Horn | 2003-09-18 16:01:33 +0000 |
commit | 9470c9f66131d16ca19d111d21948ba57a1a8eb3 (patch) | |
tree | 79aa7b664c9dcab922649ad552ef03fe6ba58e21 /sound/mixer.cpp | |
parent | dcf77f7a1008e4a6b98c9face6cc7461c6347e1d (diff) | |
download | scummvm-rg350-9470c9f66131d16ca19d111d21948ba57a1a8eb3.tar.gz scummvm-rg350-9470c9f66131d16ca19d111d21948ba57a1a8eb3.tar.bz2 scummvm-rg350-9470c9f66131d16ca19d111d21948ba57a1a8eb3.zip |
changed & documented the premixer semantics
svn-id: r10294
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r-- | sound/mixer.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index da5952ecf4..a8d611588f 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -160,7 +160,7 @@ bool SoundMixer::bindToSystem(OSystem *syst) { return syst->set_sound_proc(mixCallback, this, OSystem::SOUND_16BIT); } -void SoundMixer::setupPremix(void *param, PremixProc *proc) { +void SoundMixer::setupPremix(PremixProc *proc, void *param) { StackLock lock(_mutex); _premixParam = param; _premixProc = proc; @@ -279,12 +279,7 @@ void SoundMixer::mix(int16 *buf, uint len) { StackLock lock(_mutex); if (_premixProc && !_paused) { - int i; _premixProc(_premixParam, buf, len); - // Convert mono data from the premix proc to stereo - for (i = (len - 1); i >= 0; i--) { - buf[2 * i] = buf[2 * i + 1] = buf[i]; - } } else { // zero the buf out memset(buf, 0, 2 * len * sizeof(int16)); |