aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-07-19 21:48:59 +0000
committerTorbjörn Andersson2005-07-19 21:48:59 +0000
commit8cf83e3435ca6a63b65c0eee627805be517b2c86 (patch)
treed4b075be45ab97f6332e786ec9908930bb7ccfb0 /saga
parentd58e0180044a5895a062b6272dd9e7bdc2a124f8 (diff)
downloadscummvm-rg350-8cf83e3435ca6a63b65c0eee627805be517b2c86.tar.gz
scummvm-rg350-8cf83e3435ca6a63b65c0eee627805be517b2c86.tar.bz2
scummvm-rg350-8cf83e3435ca6a63b65c0eee627805be517b2c86.zip
Fixed crash when quitting.
svn-id: r18568
Diffstat (limited to 'saga')
-rw-r--r--saga/music.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/saga/music.cpp b/saga/music.cpp
index 84cb4c9ea7..f536663e4d 100644
--- a/saga/music.cpp
+++ b/saga/music.cpp
@@ -293,6 +293,7 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer, MidiDriver *driver, int enable
}
Music::~Music() {
+ _mixer->stopHandle(_musicHandle);
delete _player;
xmidiParser->setMidiDriver(NULL);
smfParser->setMidiDriver(NULL);
@@ -318,7 +319,7 @@ void Music::musicVolumeGauge() {
if (volume < 0)
volume = 1;
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
_player->setVolume(volume);
if (_currentVolumePercent == 100) {
@@ -335,7 +336,7 @@ void Music::setVolume(int volume, int time) {
volume = ConfMan.getInt("music_volume");
if (time == 1) {
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
Common::g_timer->removeTimerProc(&musicVolumeGaugeCallback);
_currentVolume = volume;
return;
@@ -429,7 +430,6 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
} else {
context = _vm->_resource->getContext(GAME_MUSICFILE_GM);
}
-
}
_player->setGM(true);