diff options
author | Benjamin Haisch | 2009-06-18 08:22:52 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:07 +0100 |
commit | ce7febcd70092ce0015e952af6dbfaae23bed22d (patch) | |
tree | a7772c9b72de65662cf094eb0dc9e2d85a7083df /engines/toltecs/sound.cpp | |
parent | af7e1c16833c2fb3df5c6079262d1e18d7959365 (diff) | |
download | scummvm-rg350-ce7febcd70092ce0015e952af6dbfaae23bed22d.tar.gz scummvm-rg350-ce7febcd70092ce0015e952af6dbfaae23bed22d.tar.bz2 scummvm-rg350-ce7febcd70092ce0015e952af6dbfaae23bed22d.zip |
TOLTECS: Reworked the ArchiveReader and ResourceCache classes.
ResourceCache needs more work since resources are never freed (which is bad).
Diffstat (limited to 'engines/toltecs/sound.cpp')
-rw-r--r-- | engines/toltecs/sound.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/toltecs/sound.cpp b/engines/toltecs/sound.cpp index 08df1ceec2..b3d327f5f8 100644 --- a/engines/toltecs/sound.cpp +++ b/engines/toltecs/sound.cpp @@ -133,14 +133,13 @@ void Sound::internalPlaySound(int16 resIndex, int16 type, int16 volume, int16 pa // If all channels are in use no new sound will be played if (freeChannel >= 0) { - byte *soundData = _vm->_res->load(resIndex); - uint32 soundSize = _vm->_res->getCurItemSize(); + Resource *soundResource = _vm->_res->load(resIndex); byte flags = Audio::Mixer::FLAG_UNSIGNED; // Background sounds if (type == kChannelTypeBackground) flags |= Audio::Mixer::FLAG_LOOP; - Audio::AudioStream *stream = Audio::makeLinearInputStream(soundData, soundSize, 22050, flags, 0, 0); + Audio::AudioStream *stream = Audio::makeLinearInputStream(soundResource->data, soundResource->size, 22050, flags, 0, 0); channels[freeChannel].type = type; channels[freeChannel].resIndex = resIndex; |