diff options
| author | Max Horn | 2003-07-14 22:24:18 +0000 | 
|---|---|---|
| committer | Max Horn | 2003-07-14 22:24:18 +0000 | 
| commit | 9e27fe9c9527bdc9236eb624d29968d3f3cff5a6 (patch) | |
| tree | d6b7175b53a51cc1bf6c4bf2c4284db20eef11e2 | |
| parent | b88b7f338959638a99a349a633811b21b6b126b5 (diff) | |
| download | scummvm-rg350-9e27fe9c9527bdc9236eb624d29968d3f3cff5a6.tar.gz scummvm-rg350-9e27fe9c9527bdc9236eb624d29968d3f3cff5a6.tar.bz2 scummvm-rg350-9e27fe9c9527bdc9236eb624d29968d3f3cff5a6.zip  | |
temporarily changed this to an error to help track down what is causing the sound queue overflows(in particular, to figure out the room/script/offset where the bug occurs). Please report your findings to Fingolfin
svn-id: r9028
| -rw-r--r-- | scumm/sound.cpp | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 4ca180acbc..34cbd2b045 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -125,8 +125,7 @@ void Sound::addSoundToQueue2(int sound) {  }  void Sound::processSoundQues() { -	int d; -	int num; +	int i = 0, d, num;  	int16 data[16];  	processSfxQueues(); @@ -137,7 +136,7 @@ void Sound::processSoundQues() {  			playSound(d);  	} -	for (int i = 0; i < _soundQuePos;) { +	while (i < _soundQuePos) {  		num = _soundQue[i++];  		if (i + num > _soundQuePos) {  			warning("processSoundQues: invalid num value"); @@ -832,7 +831,11 @@ void Sound::soundKludge(int *list, int num) {  	}  	if ((_soundQuePos + num) > 0x100) { -		warning("Sound que buffer overflow (%d + %d = %d)", _soundQuePos, num, _soundQuePos+num); +		// FIXME: temporarily changed this to an error to help track down what +		// is causing the sound queue overflows(in particular, to figure out +		// the room/script/offset where the bug occurs). Please report your +		// findings to Fingolfin. +		error("Sound que buffer overflow (%d + %d = %d)", _soundQuePos, num, _soundQuePos+num);  		return;  	}  | 
