aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-27 21:42:51 +0200
committerFilippos Karapetis2015-12-27 21:42:51 +0200
commitab8382418d98a22d22ce839f016be9e293f30f6e (patch)
treeb153578eb142d43c04419451b0066a64e8907af4
parent70822b32b0669221940c8f5b2f099de9d8511a0d (diff)
downloadscummvm-rg350-ab8382418d98a22d22ce839f016be9e293f30f6e.tar.gz
scummvm-rg350-ab8382418d98a22d22ce839f016be9e293f30f6e.tar.bz2
scummvm-rg350-ab8382418d98a22d22ce839f016be9e293f30f6e.zip
LAB: Do not pause the background music when a sound effect is played
-rw-r--r--engines/lab/engine.cpp2
-rw-r--r--engines/lab/music.cpp20
-rw-r--r--engines/lab/music.h11
3 files changed, 0 insertions, 33 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 4d24fb359c..8894ae79de 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -418,8 +418,6 @@ void LabEngine::mainGameLoop() {
break;
}
- _music->resumeBackMusic();
-
// Sees what kind of close up we're in and does the appropriate stuff, if any.
if (doCloseUp(_closeDataPtr)) {
_closeDataPtr = nullptr;
diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp
index 42262bf8f1..8045c51044 100644
--- a/engines/lab/music.cpp
+++ b/engines/lab/music.cpp
@@ -45,7 +45,6 @@ namespace Lab {
Music::Music(LabEngine *vm) : _vm(vm) {
_musicFile = nullptr;
- _musicPaused = false;
_curRoomMusic = 1;
_storedPos = 0;
}
@@ -64,7 +63,6 @@ void Music::changeMusic(const Common::String filename, bool storeCurPos, bool se
if (storeCurPos)
_storedPos = _musicFile->pos();
- _musicPaused = false;
stopSoundEffect();
freeMusic();
_musicFile = _vm->_resource->openDataFile(filename);
@@ -76,7 +74,6 @@ void Music::changeMusic(const Common::String filename, bool storeCurPos, bool se
}
void Music::playSoundEffect(uint16 sampleSpeed, uint32 length, bool loop, Common::File *dataFile) {
- pauseBackMusic();
stopSoundEffect();
// NOTE: We need to use malloc(), cause this will be freed with free()
@@ -100,26 +97,9 @@ bool Music::isSoundEffectActive() const {
void Music::freeMusic() {
_vm->_mixer->stopHandle(_musicHandle);
_vm->_mixer->stopHandle(_sfxHandle);
- _musicPaused = false;
_musicFile = nullptr;
}
-void Music::pauseBackMusic() {
- if (!_musicPaused) {
- stopSoundEffect();
- _vm->_mixer->pauseHandle(_musicHandle, true);
- _musicPaused = true;
- }
-}
-
-void Music::resumeBackMusic() {
- if (_musicPaused) {
- stopSoundEffect();
- _vm->_mixer->pauseHandle(_musicHandle, false);
- _musicPaused = false;
- }
-}
-
void Music::checkRoomMusic() {
if ((_curRoomMusic == _vm->_roomNum) || !_musicFile)
return;
diff --git a/engines/lab/music.h b/engines/lab/music.h
index a06bfca306..09bb9694ac 100644
--- a/engines/lab/music.h
+++ b/engines/lab/music.h
@@ -50,7 +50,6 @@ private:
LabEngine *_vm;
Common::File *_musicFile;
- bool _musicPaused;
uint16 _curRoomMusic;
uint32 _storedPos;
@@ -58,12 +57,7 @@ private:
Audio::SoundHandle _sfxHandle;
private:
- /**
- * Pauses the background music.
- */
- void pauseBackMusic();
void readSound(bool waitTillFinished, bool loop, Common::File *file);
-
byte getSoundFlags();
public:
@@ -92,11 +86,6 @@ public:
*/
bool loadSoundEffect(const Common::String filename, bool loop, bool waitTillFinished);
- /**
- * Resumes the paused background music.
- */
- void resumeBackMusic();
-
void stopSoundEffect();
};