aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-01-27 00:42:43 +0000
committerMax Horn2009-01-27 00:42:43 +0000
commit8e447d1ee93d3238d35a665c5ec63671ed890210 (patch)
treefc980ae05de56de256385cc2d2311f88897eccac /engines
parentc08cc29b965f31dd7c233714d0a052ab357c4bc5 (diff)
downloadscummvm-rg350-8e447d1ee93d3238d35a665c5ec63671ed890210.tar.gz
scummvm-rg350-8e447d1ee93d3238d35a665c5ec63671ed890210.tar.bz2
scummvm-rg350-8e447d1ee93d3238d35a665c5ec63671ed890210.zip
Extended makeWAVStream by a 'disposeAfterUse' param; changed makeWAVStream to directly return the AudioStream created by makeADPCMStream
svn-id: r36085
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/animation.cpp2
-rw-r--r--engines/agos/sound.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index ec51f8479b..9ba8320098 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -301,7 +301,7 @@ void MoviePlayerDXA::startSound() {
}
Common::MemoryReadStream stream(buffer, size);
- _bgSoundStream = Audio::makeWAVStream(stream);
+ _bgSoundStream = Audio::makeWAVStream(&stream, false);
free(buffer);
} else {
_bgSoundStream = Audio::AudioStream::openStreamFile(baseName);
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 5558e9025a..3aa3bd1865 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -247,7 +247,7 @@ Audio::AudioStream *WavSound::makeAudioStream(uint sound) {
return NULL;
_file->seek(_offsets[sound], SEEK_SET);
- return Audio::makeWAVStream(*_file);
+ return Audio::makeWAVStream(_file, false);
}
void WavSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
@@ -263,6 +263,7 @@ void VocSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType typ
int size, rate;
byte *buffer = Audio::loadVOCFromStream(*_file, size, rate);
+ // TODO: Use makeVOCStream
assert(buffer);
_mixer->playRaw(type, handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE);
}
@@ -741,6 +742,7 @@ void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint soun
uint16 compType;
int blockAlign, rate;
+ // FIXME: How about using makeWAVStream() here?
int size = READ_LE_UINT32(soundData + 4);
Common::MemoryReadStream stream(soundData, size);
if (!Audio::loadWAVFromStream(stream, size, rate, flags, &compType, &blockAlign))