diff options
author | Johannes Schickel | 2008-03-21 16:21:27 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-21 16:21:27 +0000 |
commit | b615eb177b0b840204d2f1483a7c677e1fcfeedc (patch) | |
tree | d43196e2a2453862e7838eaa44dbc5488956a2e0 /engines/kyra/sound_towns.cpp | |
parent | a169619526c811f1718bbeb5ed980f68b9d2c8e7 (diff) | |
download | scummvm-rg350-b615eb177b0b840204d2f1483a7c677e1fcfeedc.tar.gz scummvm-rg350-b615eb177b0b840204d2f1483a7c677e1fcfeedc.tar.bz2 scummvm-rg350-b615eb177b0b840204d2f1483a7c677e1fcfeedc.zip |
Cleanup.
svn-id: r31210
Diffstat (limited to 'engines/kyra/sound_towns.cpp')
-rw-r--r-- | engines/kyra/sound_towns.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index e34f7d014c..28d869b955 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1432,15 +1432,15 @@ void SoundTowns_v2::haltTrack() { //_driver->reset(); } -void SoundTowns_v2::voicePlay(const char *file) { +bool SoundTowns_v2::voicePlay(const char *file) { static const uint16 rates[] = { 0x10E1, 0x0CA9, 0x0870, 0x0654, 0x0438, 0x032A, 0x021C, 0x0194 }; int h = 0; if (_currentSFX) { - while (_mixer->isSoundHandleActive(_sfxHandles[h]) && h < kNumChannelHandles) + while (_mixer->isSoundHandleActive(_soundChannels[h].channelHandle) && h < kNumChannelHandles) h++; if (h >= kNumChannelHandles) - return; + return false; } uint8 * data = _vm->resource()->fileData(file, 0); @@ -1490,9 +1490,11 @@ void SoundTowns_v2::voicePlay(const char *file) { _currentSFX = Audio::makeLinearInputStream(sfx, outsize, outputRate, Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_LITTLE_ENDIAN | Audio::Mixer::FLAG_AUTOFREE, 0, 0); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandles[h], _currentSFX); + _soundChannels[h].file = file; + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h].channelHandle, _currentSFX); delete [] data; + return true; } void SoundTowns_v2::beginFadeOut() { |