diff options
author | Max Horn | 2007-07-15 19:24:00 +0000 |
---|---|---|
committer | Max Horn | 2007-07-15 19:24:00 +0000 |
commit | f4c0b853cc8453acac0c9e6f6901c0056a2288fa (patch) | |
tree | ce3b9d4a1a040fa14a19d90da2bf6d87ad459c68 /engines/sword1 | |
parent | 11b2806741da02dde2e2e4c1d5fa8ebb26d64233 (diff) | |
download | scummvm-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/sword1')
-rw-r--r-- | engines/sword1/sound.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 492672fad8..2594aaf8f4 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -201,7 +201,9 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { #ifdef USE_FLAC else if (_cowMode == CowFlac) { _cowFile.seek(index); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeFlacStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); + Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); + assert(tmp); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeFlacStream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -212,7 +214,9 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { #ifdef USE_VORBIS else if (_cowMode == CowVorbis) { _cowFile.seek(index); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeVorbisStream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); + Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); + assert(tmp); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeVorbisStream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -223,7 +227,9 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { #ifdef USE_MAD else if (_cowMode == CowMp3) { _cowFile.seek(index); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(&_cowFile, sampleSize), SOUND_SPEECH_ID, speechVol, speechPan); + Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); + assert(tmp); + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, Audio::makeMP3Stream(tmp, true), SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) |