aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/toon/audio.cpp6
-rw-r--r--engines/toon/toon.cpp5
2 files changed, 8 insertions, 3 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);
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 53008b42d4..84b404d7f2 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -2982,8 +2982,8 @@ void ToonEngine::restorePalette() {
const char *ToonEngine::getSpecialConversationMusic(int32 conversationId) {
static const char * const specialMusic[] = {
- "BR091013", "BR091013",
0, 0,
+ "BR091013", "BR091013",
"NET1214", "NET1214",
0, 0,
"CAR1365B", "CAR1365B",
@@ -2991,6 +2991,7 @@ const char *ToonEngine::getSpecialConversationMusic(int32 conversationId) {
0, 0,
"CAR14431", "CAR14431",
0, 0,
+ 0, 0,
"SCD16520", "SCD16520",
"SCD16520", "SCD16520",
"SCD16522", "SCD16522",
@@ -3048,7 +3049,7 @@ const char *ToonEngine::getSpecialConversationMusic(int32 conversationId) {
0, 0
};
- return specialMusic[randRange(0, 1) + conversationId * 2];
+ return specialMusic[randRange(0, 1) + conversationId * 2];
}
void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemDest) {