From f8190443caa4523eceb8d78fb2c38f5eda5f996c Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Thu, 6 Jun 2002 21:50:20 +0000 Subject: [PATCH] As long as I am fixing regression bug introduced by my streaming patch, fix also the 'FLAG_FILE' stuff. Endy, you should be able to revert your patch to Simon as it should not be needed anymore now :-) svn-id: r4412 --- sound/mixer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/mixer.cpp b/sound/mixer.cpp index 21120dc47e2..0fbaf627e64 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -335,6 +335,7 @@ static int16 *(*mixer_helper_table[16])(int16 *data, uint *len_ptr, byte **s_ptr void SoundMixer::Channel_RAW::mix(int16 *data, uint len) { byte *s, *s_org = NULL; uint32 fp_pos; + byte *end; if (_to_be_destroyed) { real_destroy(); @@ -362,15 +363,17 @@ void SoundMixer::Channel_RAW::mix(int16 *data, uint len) { s = s_org; fp_pos = 0; + end = s_org + num; } else { s = (byte*)_ptr + _pos; fp_pos = _fp_pos; + end = (byte *) _ptr + _realsize; } const uint32 fp_speed = _fp_speed; const int16 *vol_tab = _mixer->_volume_table; - mixer_helper_table[_flags & 0x07](data, &len, &s, &fp_pos, fp_speed, vol_tab, (byte *) _ptr + _realsize); + mixer_helper_table[_flags & 0x07](data, &len, &s, &fp_pos, fp_speed, vol_tab, end); _pos = s - (byte*) _ptr; _fp_pos = fp_pos;