aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/sound.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-08-05 19:34:20 +0000
committerDavid Corrales2007-08-05 19:34:20 +0000
commit6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch)
treeb81a2234c2beff0312c93e039d6cafda4babeca6 /engines/agos/sound.cpp
parent1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff)
parentec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff)
downloadscummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz
scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2
scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip
Merged fsnode with trunk: r27971:28460
svn-id: r28462
Diffstat (limited to 'engines/agos/sound.cpp')
-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) {