diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/sound.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/sound.h | 5 | ||||
-rw-r--r-- | engines/kyra/sound_digital.cpp | 8 | ||||
-rw-r--r-- | engines/touche/resource.cpp | 3 | ||||
-rw-r--r-- | engines/tucker/resource.cpp | 2 |
5 files changed, 15 insertions, 9 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 865360dfc1..e5ae400de3 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -241,12 +241,12 @@ namespace { // A simple wrapper to create VOC streams the way like creating MP3, OGG/Vorbis and FLAC streams. // Possible TODO: Think of making this complete and moving it to sound/voc.cpp ? -Audio::AudioStream *makeVOCStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) { +Audio::SeekableAudioStream *makeVOCStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) { #ifdef STREAM_AUDIO_FROM_DISK - Audio::AudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED, 0, 0, disposeAfterUse); + Audio::SeekableAudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED, 0, 0, disposeAfterUse); #else - Audio::AudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED); + Audio::SeekableAudioStream *as = Audio::makeVOCStream(*stream, Audio::Mixer::FLAG_UNSIGNED); if (disposeAfterUse) delete stream; diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 24d1bee41a..57b51e594c 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -35,6 +35,7 @@ namespace Audio { class AudioStream; +class SeekableAudioStream; } // End of namespace Audio namespace Kyra { @@ -240,7 +241,7 @@ private: struct SpeechCodecs { const char *fileext; - Audio::AudioStream *(*streamFunc)( + Audio::SeekableAudioStream *(*streamFunc)( Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, @@ -358,7 +359,7 @@ private: struct AudioCodecs { const char *fileext; - Audio::AudioStream *(*streamFunc)( + Audio::SeekableAudioStream *(*streamFunc)( Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index 3a04fa266b..0687c06cc8 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -107,7 +107,7 @@ int KyraAudioStream::readBuffer(int16 *buffer, const int numSamples) { // TODO: cleanup of whole AUDStream -class AUDStream : public Audio::AudioStream { +class AUDStream : public Audio::SeekableAudioStream { public: AUDStream(Common::SeekableReadStream *stream, bool loop = false); ~AUDStream(); @@ -118,6 +118,10 @@ public: bool endOfData() const { return _endOfData; } int getRate() const { return _rate; } + + // GROSS HACK, if anyone sees this, be aware that you should + // never copy this! This is just a temporary hack... + bool seek(const Audio::Timestamp &) { return false; } private: Common::SeekableReadStream *_stream; bool _loop; @@ -475,7 +479,7 @@ void SoundDigital::beginFadeOut(int channel, int ticks) { namespace { -Audio::AudioStream *makeAUDStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) { +Audio::SeekableAudioStream *makeAUDStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) { return new AUDStream(stream, numLoops == 0 ? true : false); } diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp index 0434b198d6..d16a60bdbc 100644 --- a/engines/touche/resource.cpp +++ b/engines/touche/resource.cpp @@ -30,6 +30,7 @@ #include "sound/mp3.h" #include "sound/voc.h" #include "sound/vorbis.h" +#include "sound/audiostream.h" #include "touche/midi.h" #include "touche/touche.h" @@ -44,7 +45,7 @@ enum { struct CompressedSpeechFile { const char *filename; - Audio::AudioStream *(*makeStream)( + Audio::SeekableAudioStream *(*makeStream)( Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp index 8bc6e2c8e3..e868dbaef8 100644 --- a/engines/tucker/resource.cpp +++ b/engines/tucker/resource.cpp @@ -43,7 +43,7 @@ enum { struct CompressedSoundFile { const char *filename; - Audio::AudioStream *(*makeStream)(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops); + Audio::SeekableAudioStream *(*makeStream)(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops); }; static const CompressedSoundFile compressedSoundFilesTable[] = { |