aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-04 16:23:24 -0400
committerPaul Gilbert2015-07-04 16:23:24 -0400
commit23314ed5d8028f384c9ff9e2138456a3fa6ecf48 (patch)
treecd642587502ef58353da0bb1e067f6a8cc102de1 /engines/sherlock
parent3f31b5ba64115b0823da2c2137fe3ee4a5251b0e (diff)
downloadscummvm-rg350-23314ed5d8028f384c9ff9e2138456a3fa6ecf48.tar.gz
scummvm-rg350-23314ed5d8028f384c9ff9e2138456a3fa6ecf48.tar.bz2
scummvm-rg350-23314ed5d8028f384c9ff9e2138456a3fa6ecf48.zip
SHERLOCK: SS: Fix crash in intro when music finishes
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/music.cpp13
-rw-r--r--engines/sherlock/music.h2
2 files changed, 6 insertions, 9 deletions
diff --git a/engines/sherlock/music.cpp b/engines/sherlock/music.cpp
index 1f211f4c51..49c48126f4 100644
--- a/engines/sherlock/music.cpp
+++ b/engines/sherlock/music.cpp
@@ -210,6 +210,8 @@ void MidiParser_SH::unloadMusic() {
_musData = NULL;
_musDataSize = 0;
}
+
+ MidiParser::unloadMusic();
}
/*----------------------------------------------------------------*/
@@ -504,14 +506,7 @@ bool Music::playMusic(const Common::String &name) {
}
void Music::stopMusic() {
- if (isPlaying()) {
- if (!IS_3DO)
- _midiParser->stopPlaying();
- else
- _mixer->stopHandle(_digitalMusicHandle);
- }
-
- _musicPlaying = false;
+ freeSong();
}
void Music::startSong() {
@@ -531,6 +526,8 @@ void Music::freeSong() {
// Free the MIDI MUS data buffer
_midiParser->unloadMusic();
}
+
+ _musicPlaying = false;
}
void Music::waitTimerRoland(uint time) {
diff --git a/engines/sherlock/music.h b/engines/sherlock/music.h
index 1bcedf273b..93c565c162 100644
--- a/engines/sherlock/music.h
+++ b/engines/sherlock/music.h
@@ -52,7 +52,7 @@ protected:
public:
bool loadMusic(byte *musData, uint32 musSize);
- void unloadMusic();
+ virtual void unloadMusic();
private:
byte *_musData;