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
This commit is contained in:
Lionel Ulmer 2002-06-06 21:50:20 +00:00
parent 6abeab5b5a
commit f8190443ca

View File

@ -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) { void SoundMixer::Channel_RAW::mix(int16 *data, uint len) {
byte *s, *s_org = NULL; byte *s, *s_org = NULL;
uint32 fp_pos; uint32 fp_pos;
byte *end;
if (_to_be_destroyed) { if (_to_be_destroyed) {
real_destroy(); real_destroy();
@ -362,15 +363,17 @@ void SoundMixer::Channel_RAW::mix(int16 *data, uint len) {
s = s_org; s = s_org;
fp_pos = 0; fp_pos = 0;
end = s_org + num;
} else { } else {
s = (byte*)_ptr + _pos; s = (byte*)_ptr + _pos;
fp_pos = _fp_pos; fp_pos = _fp_pos;
end = (byte *) _ptr + _realsize;
} }
const uint32 fp_speed = _fp_speed; const uint32 fp_speed = _fp_speed;
const int16 *vol_tab = _mixer->_volume_table; 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; _pos = s - (byte*) _ptr;
_fp_pos = fp_pos; _fp_pos = fp_pos;