[Scummvm-cvs-logs] SF.net SVN: scummvm:[33570] scummvm/trunk/engines/sky
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sun Aug 3 12:16:18 CEST 2008
Revision: 33570
http://scummvm.svn.sourceforge.net/scummvm/?rev=33570&view=rev
Author: eriktorbjorn
Date: 2008-08-03 10:16:17 +0000 (Sun, 03 Aug 2008)
Log Message:
-----------
Fixed bug #1995033 ("BASS: BG Sound stopped on opening item list"). Apparently
the sound is supposed to be paused and then unpaused, but the pause function is
called many more times than the unpause function. In the original, this
presumably didn't matter. In ScummVM's mixer, it does.
Modified Paths:
--------------
scummvm/trunk/engines/sky/sound.cpp
scummvm/trunk/engines/sky/sound.h
Modified: scummvm/trunk/engines/sky/sound.cpp
===================================================================
--- scummvm/trunk/engines/sky/sound.cpp 2008-08-03 09:52:22 UTC (rev 33569)
+++ scummvm/trunk/engines/sky/sound.cpp 2008-08-03 10:16:17 UTC (rev 33570)
@@ -1025,6 +1025,7 @@
_mixer = mixer;
_saveSounds[0] = _saveSounds[1] = 0xFFFF;
_mainSfxVolume = pVolume;
+ _isPaused = false;
}
Sound::~Sound(void) {
@@ -1254,14 +1255,20 @@
void Sound::fnPauseFx(void) {
- _mixer->pauseID(SOUND_CH0, true);
- _mixer->pauseID(SOUND_CH1, true);
+ if (!_isPaused) {
+ _isPaused = true;
+ _mixer->pauseID(SOUND_CH0, true);
+ _mixer->pauseID(SOUND_CH1, true);
+ }
}
void Sound::fnUnPauseFx(void) {
- _mixer->pauseID(SOUND_CH0, false);
- _mixer->pauseID(SOUND_CH1, false);
+ if (_isPaused) {
+ _isPaused = false;
+ _mixer->pauseID(SOUND_CH0, false);
+ _mixer->pauseID(SOUND_CH1, false);
+ }
}
} // End of namespace Sky
Modified: scummvm/trunk/engines/sky/sound.h
===================================================================
--- scummvm/trunk/engines/sky/sound.h 2008-08-03 09:52:22 UTC (rev 33569)
+++ scummvm/trunk/engines/sky/sound.h 2008-08-03 10:16:17 UTC (rev 33570)
@@ -89,6 +89,8 @@
uint8 *_sampleRates, *_sfxInfo;
uint8 _mainSfxVolume;
+ bool _isPaused;
+
static uint16 _speechConvertTable[8];
static SfxQueue _sfxQueue[MAX_QUEUED_FX];
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list