aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-10-05 00:16:50 +0000
committerTravis Howell2006-10-05 00:16:50 +0000
commitb18fdb4c0a146dada1f4e33ca8e7d285e794156d (patch)
tree1bffb1c8e9bace3223a91db21fac7ef447cf34f8 /engines
parent98f62b9e65ad771cfa1993ac5da492650281f55f (diff)
downloadscummvm-rg350-b18fdb4c0a146dada1f4e33ca8e7d285e794156d.tar.gz
scummvm-rg350-b18fdb4c0a146dada1f4e33ca8e7d285e794156d.tar.bz2
scummvm-rg350-b18fdb4c0a146dada1f4e33ca8e7d285e794156d.zip
Remove sound hacks for DS port, which would cause no speech or subtitles in Simon 1 with speech
svn-id: r24117
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/sound.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 5af4340804..182722cf17 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -143,13 +143,9 @@ void WavSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
flags |= wavFlags;
byte *buffer = (byte *)malloc(size);
- // Check whether malloc was successful.
- // TODO: Maybe we can handle this more graceful, by reverting to a smaller
- // buffer and reading the audio data one piece at a time?
- if (buffer) {
- _file->read(buffer, size);
- _mixer->playRaw(handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE);
- }
+ assert(buffer);
+ _file->read(buffer, size);
+ _mixer->playRaw(handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE);
}
void VocSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
@@ -160,6 +156,7 @@ void VocSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
int size, rate;
byte *buffer = Audio::loadVOCFromStream(*_file, size, rate);
+ assert(buffer);
_mixer->playRaw(handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE);
}
@@ -171,13 +168,9 @@ void RawSound::playSound(uint sound, Audio::SoundHandle *handle, byte flags) {
uint size = _file->readUint32BE();
byte *buffer = (byte *)malloc(size);
- // Check whether malloc was successful.
- // TODO: Maybe we can handle this more graceful, by reverting to a smaller
- // buffer and reading the audio data one piece at a time?
- if (buffer) {
- _file->read(buffer, size);
- _mixer->playRaw(handle, buffer, size, 22050, flags | Audio::Mixer::FLAG_AUTOFREE);
- }
+ assert(buffer);
+ _file->read(buffer, size);
+ _mixer->playRaw(handle, buffer, size, 22050, flags | Audio::Mixer::FLAG_AUTOFREE);
}
#ifdef USE_MAD