diff options
Diffstat (limited to 'engines/toltecs/sound.cpp')
-rw-r--r-- | engines/toltecs/sound.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp index 012b5eec61..875fd0b935 100644 --- a/engines/toltecs/sound.cpp +++ b/engines/toltecs/sound.cpp @@ -66,7 +66,7 @@ void Sound::playSound(int16 resIndex, int16 type, int16 volume) { debug("playSound(%d, %d, %d)", resIndex, type, volume); - if (volume == -1 || type == kChannelTypeSfx) { + if (volume == -1 || type == -2) { if (type == kChannelTypeBackground) { internalPlaySound(resIndex, type, 50 /*TODO*/, 0); } else { @@ -117,7 +117,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa channels[i].type = kChannelTypeEmpty; channels[i].resIndex = -1; } - } else if (type == kChannelTypeSfx) { + } else if (type == -2) { // Stop sounds with specified resIndex for (int i = 0; i < 4; i++) { if (channels[i].resIndex == resIndex) { @@ -128,7 +128,7 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa } } else { - if (type == -2) { + if (type == -3) { // Stop speech and play new sound stopSpeech(); } @@ -156,7 +156,13 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa channels[freeChannel].type = type; channels[freeChannel].resIndex = resIndex; - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType/*TODO*/, &channels[freeChannel].handle, + Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType; + /* + switch (type) { + } + */ + + _vm->_mixer->playInputStream(soundType, &channels[freeChannel].handle, stream, -1, volume, panning); } |