[Scummvm-cvs-logs] SF.net SVN: scummvm: [25220] scummvm/trunk/engines/agos/sound.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Jan 27 02:07:13 CET 2007
Revision: 25220
http://scummvm.svn.sourceforge.net/scummvm/?rev=25220&view=rev
Author: kirben
Date: 2007-01-26 17:07:12 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Revert audiostream changes for VOC sound, due to sgin differences in Amiga CD32 verison of Simon 1.
Modified Paths:
--------------
scummvm/trunk/engines/agos/sound.cpp
Modified: scummvm/trunk/engines/agos/sound.cpp
===================================================================
--- scummvm/trunk/engines/agos/sound.cpp 2007-01-27 00:33:38 UTC (rev 25219)
+++ scummvm/trunk/engines/agos/sound.cpp 2007-01-27 01:07:12 UTC (rev 25220)
@@ -125,7 +125,6 @@
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 @@
_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) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list