aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2007-07-15 18:29:05 +0000
committerMax Horn2007-07-15 18:29:05 +0000
commit11b2806741da02dde2e2e4c1d5fa8ebb26d64233 (patch)
tree35d0d86b7683d6c61592dc29474df415db27f3d6 /engines
parente07e5eeb1dbe83f23de230481568ac5d977b1f0a (diff)
downloadscummvm-rg350-11b2806741da02dde2e2e4c1d5fa8ebb26d64233.tar.gz
scummvm-rg350-11b2806741da02dde2e2e4c1d5fa8ebb26d64233.tar.bz2
scummvm-rg350-11b2806741da02dde2e2e4c1d5fa8ebb26d64233.zip
Removed the old (obsolete) audiostream factories for MP3/Vorbis/FLAC data which took a File pointer and a size (these were only implemented as brain-dead wrapper around the newer factory methods anyway)
svn-id: r28110
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound.h7
-rw-r--r--engines/touche/resource.cpp11
3 files changed, 18 insertions, 4 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 8deed22091..1d2ff2e512 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -61,7 +61,9 @@ void Sound::voicePlay(const char *file) {
if (!_compressHandle.isOpen())
continue;
- _currentVocFile = _supportedCodes[i].streamFunc(&_compressHandle, fileSize);
+ Common::MemoryReadStream *tmp = _compressHandle.readStream(fileSize);
+ assert(tmp);
+ _currentVocFile = _supportedCodes[i].streamFunc(tmp, true, 0, 0, 1);
found = true;
break;
}
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 28a9521112..b6c06b493b 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -109,7 +109,12 @@ private:
struct SpeechCodecs {
const char *fileext;
- Audio::AudioStream *(*streamFunc)(Common::File*, uint32);
+ Audio::AudioStream *(*streamFunc)(
+ Common::SeekableReadStream *stream,
+ bool disposeAfterUse,
+ uint32 startTime,
+ uint32 duration,
+ uint numLoops);
};
static const SpeechCodecs _supportedCodes[];
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 585e70c534..f9f2938502 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -44,7 +44,12 @@ enum {
struct CompressedSpeechFile {
const char *filename;
- Audio::AudioStream *(*makeStream)(Common::File *file, uint32 size);
+ Audio::AudioStream *(*makeStream)(
+ Common::SeekableReadStream *stream,
+ bool disposeAfterUse,
+ uint32 startTime,
+ uint32 duration,
+ uint numLoops);
};
static const CompressedSpeechFile compressedSpeechFilesTable[] = {
@@ -656,7 +661,9 @@ void ToucheEngine::res_loadSpeechSegment(int num) {
return;
}
_fSpeech[0].seek(offs);
- stream = (compressedSpeechFilesTable[_compressedSpeechData].makeStream)(&_fSpeech[0], size);
+ Common::MemoryReadStream *tmp = _fSpeech[0].readStream(size);
+ assert(tmp);
+ stream = (compressedSpeechFilesTable[_compressedSpeechData].makeStream)(tmp, true, 0, 0, 1);
}
if (stream) {
_speechPlaying = true;