aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorMax Horn2007-07-15 19:24:00 +0000
committerMax Horn2007-07-15 19:24:00 +0000
commitf4c0b853cc8453acac0c9e6f6901c0056a2288fa (patch)
treece3b9d4a1a040fa14a19d90da2bf6d87ad459c68 /engines/agos
parent11b2806741da02dde2e2e4c1d5fa8ebb26d64233 (diff)
downloadscummvm-rg350-f4c0b853cc8453acac0c9e6f6901c0056a2288fa.tar.gz
scummvm-rg350-f4c0b853cc8453acac0c9e6f6901c0056a2288fa.tar.bz2
scummvm-rg350-f4c0b853cc8453acac0c9e6f6901c0056a2288fa.zip
Fixed sound factory messup caused by my previous commit
svn-id: r28111
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/sound.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 7165e3cbff..a735f54c29 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -292,7 +292,9 @@ Audio::AudioStream *MP3Sound::makeAudioStream(uint sound) {
uint32 size = _offsets[sound + i] - _offsets[sound];
- return Audio::makeMP3Stream(_file, size);
+ Common::MemoryReadStream *tmp = _file->readStream(size);
+ assert(tmp);
+ return Audio::makeMP3Stream(tmp, true);
}
void MP3Sound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
@@ -321,7 +323,9 @@ Audio::AudioStream *VorbisSound::makeAudioStream(uint sound) {
uint32 size = _offsets[sound + i] - _offsets[sound];
- return Audio::makeVorbisStream(_file, size);
+ Common::MemoryReadStream *tmp = _file->readStream(size);
+ assert(tmp);
+ return Audio::makeVorbisStream(tmp, true);
}
void VorbisSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {
@@ -350,7 +354,9 @@ Audio::AudioStream *FlacSound::makeAudioStream(uint sound) {
uint32 size = _offsets[sound + i] - _offsets[sound];
- return Audio::makeFlacStream(_file, size);
+ Common::MemoryReadStream *tmp = _file->readStream(size);
+ assert(tmp);
+ return Audio::makeFlacStream(tmp, true);
}
void FlacSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, byte flags, int vol) {