diff options
author | Max Horn | 2009-10-14 22:37:05 +0000 |
---|---|---|
committer | Max Horn | 2009-10-14 22:37:05 +0000 |
commit | 6a2985ba08fc030d93d625615d7b1b5604fbc98c (patch) | |
tree | e25a72cfb73129ded78f0b72269778b7f98fe868 /engines/agos/animation.cpp | |
parent | a7e6f50ede79a0f7f1ca89ae6900d838cf4fe334 (diff) | |
download | scummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.tar.gz scummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.tar.bz2 scummvm-rg350-6a2985ba08fc030d93d625615d7b1b5604fbc98c.zip |
Patch #2834677: Wave/ADPCM Endianness Fixes
svn-id: r45095
Diffstat (limited to 'engines/agos/animation.cpp')
-rw-r--r-- | engines/agos/animation.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index efcd78e482..e2511f335f 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -282,7 +282,6 @@ void MoviePlayerDXA::stopVideo() { } void MoviePlayerDXA::startSound() { - byte *buffer; uint32 offset, size; if (getSoundTag() == MKID_BE('WAVE')) { @@ -302,18 +301,12 @@ void MoviePlayerDXA::startSound() { offset = in.readUint32LE(); size = in.readUint32LE(); - buffer = (byte *)malloc(size); in.seek(offset, SEEK_SET); - in.read(buffer, size); + _bgSoundStream = Audio::makeWAVStream(in.readStream(size), true); in.close(); } else { - buffer = (byte *)malloc(size); - _fileStream->read(buffer, size); + _bgSoundStream = Audio::makeWAVStream(_fileStream->readStream(size), true); } - - Common::MemoryReadStream stream(buffer, size); - _bgSoundStream = Audio::makeWAVStream(&stream, false); - free(buffer); } else { _bgSoundStream = Audio::AudioStream::openStreamFile(baseName); } |