aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2010-11-19 17:03:07 +0000
committerMax Horn2010-11-19 17:03:07 +0000
commit2180b2d6b534d3786f89d02fe508c60c68b7ff89 (patch)
treeac7af0e5f5049537f4c81c401d5685bebbb47068 /engines/agos/sound.cpp
parent111384473bb65741f7f2b945e1c00e6aeccc805c (diff)
downloadscummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.tar.gz
scummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.tar.bz2
scummvm-rg350-2180b2d6b534d3786f89d02fe508c60c68b7ff89.zip
COMMON: Split common/stream.h into several headers
svn-id: r54385
Diffstat (limited to 'engines/agos/sound.cpp')
-rw-r--r--engines/agos/sound.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 8914470370..20deb47be8 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -24,6 +24,7 @@
*/
#include "common/file.h"
+#include "common/memstream.h"
#include "common/util.h"
#include "agos/agos.h"
@@ -305,7 +306,7 @@ class CompressedSound : public BaseSound {
public:
CompressedSound(Audio::Mixer *mixer, Common::File *file, uint32 base) : BaseSound(mixer, file, base, false) {}
- Common::MemoryReadStream *loadStream(uint sound) const {
+ Common::SeekableReadStream *loadStream(uint sound) const {
if (_offsets == NULL)
return NULL;
@@ -334,7 +335,7 @@ class MP3Sound : public CompressedSound {
public:
MP3Sound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
- Common::MemoryReadStream *tmp = loadStream(sound);
+ Common::SeekableReadStream *tmp = loadStream(sound);
if (!tmp)
return NULL;
return Audio::makeMP3Stream(tmp, DisposeAfterUse::YES);
@@ -350,7 +351,7 @@ class VorbisSound : public CompressedSound {
public:
VorbisSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
- Common::MemoryReadStream *tmp = loadStream(sound);
+ Common::SeekableReadStream *tmp = loadStream(sound);
if (!tmp)
return NULL;
return Audio::makeVorbisStream(tmp, DisposeAfterUse::YES);
@@ -366,7 +367,7 @@ class FLACSound : public CompressedSound {
public:
FLACSound(Audio::Mixer *mixer, Common::File *file, uint32 base = 0) : CompressedSound(mixer, file, base) {}
Audio::AudioStream *makeAudioStream(uint sound) {
- Common::MemoryReadStream *tmp = loadStream(sound);
+ Common::SeekableReadStream *tmp = loadStream(sound);
if (!tmp)
return NULL;
return Audio::makeFLACStream(tmp, DisposeAfterUse::YES);
@@ -775,7 +776,7 @@ void Sound::playVoiceData(byte *soundData, uint sound) {
void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint sound, int pan, int vol, bool loop) {
int size = READ_LE_UINT32(soundData + 4) + 8;
- Common::MemoryReadStream *stream = new Common::MemoryReadStream(soundData, size);
+ Common::SeekableReadStream *stream = new Common::MemoryReadStream(soundData, size);
Audio::RewindableAudioStream *sndStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES);
convertVolume(vol);