aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/audio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toon/audio.cpp')
-rw-r--r--engines/toon/audio.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index ed22186a49..ac92418e81 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -70,6 +70,10 @@ void AudioManager::playMusic(Common::String dir, Common::String music) {
_currentMusicName = music;
+ Common::SeekableReadStream *srs = _vm->resources()->openFile(path);
+ if (!srs)
+ return;
+
// see what channel to take
if (_channels[0] && _channels[0]->isPlaying() && _channels[1] && _channels[1]->isPlaying()) {
// take the one that is fading
@@ -91,7 +95,7 @@ void AudioManager::playMusic(Common::String dir, Common::String music) {
_currentMusicChannel = 0;
}
- Common::SeekableReadStream *srs = _vm->resources()->openFile(path);
+
//if (!_channels[_currentMusicChannel])
// delete _channels[_currentMusicChannel];
_channels[_currentMusicChannel] = new AudioStreamInstance(this, _mixer, srs, true);