diff options
author | Travis Howell | 2007-01-27 01:07:12 +0000 |
---|---|---|
committer | Travis Howell | 2007-01-27 01:07:12 +0000 |
commit | 82cc1db7943bfd9917f5deb33b82db58c75f1e15 (patch) | |
tree | 514625744f5e42d40b4bfd9e99dfb1f5664b5347 | |
parent | 20aca1092b62983e38f3231d267dd070c4d306db (diff) | |
download | scummvm-rg350-82cc1db7943bfd9917f5deb33b82db58c75f1e15.tar.gz scummvm-rg350-82cc1db7943bfd9917f5deb33b82db58c75f1e15.tar.bz2 scummvm-rg350-82cc1db7943bfd9917f5deb33b82db58c75f1e15.zip |
Revert audiostream changes for VOC sound, due to sgin differences in Amiga CD32 verison of Simon 1.
svn-id: r25220
-rw-r--r-- | engines/agos/sound.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index ec763d2007..3349f93a77 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -125,7 +125,6 @@ public: class VocSound : public BaseSound { public: VocSound(Audio::Mixer *mixer, File *file, uint32 base = 0, bool bigEndian = false) : BaseSound(mixer, file, base, bigEndian) {}; - Audio::AudioStream *makeAudioStream(uint sound); void playSound(uint sound, uint loopSound, Audio::SoundHandle *handle, byte flags, int vol = 0); }; @@ -240,16 +239,16 @@ void WavSound::playSound(uint sound, uint loopSound, Audio::SoundHandle *handle, _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, new LoopingAudioStream(this, sound, loopSound, (flags & Audio::Mixer::FLAG_LOOP) != 0), sound, vol); } -Audio::AudioStream *VocSound::makeAudioStream(uint sound) { +void VocSound::playSound(uint sound, uint loopSound, Audio::SoundHandle *handle, byte flags, int vol) { if (_offsets == NULL) - return NULL; + return; _file->seek(_offsets[sound], SEEK_SET); - return Audio::makeVOCStream(*_file); -} -void VocSound::playSound(uint sound, uint loopSound, Audio::SoundHandle *handle, byte flags, int vol) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, new LoopingAudioStream(this, sound, loopSound, (flags & Audio::Mixer::FLAG_LOOP) != 0), sound); + int size, rate; + byte *buffer = Audio::loadVOCFromStream(*_file, size, rate); + assert(buffer); + _mixer->playRaw(handle, buffer, size, rate, flags | Audio::Mixer::FLAG_AUTOFREE, sound); } void RawSound::playSound(uint sound, uint loopSound, Audio::SoundHandle *handle, byte flags, int vol) { |