aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-06 00:01:57 +0000
committerJohannes Schickel2010-01-06 00:01:57 +0000
commit8638d6ce61414c8cb6ed87ef6101e6c113f97065 (patch)
treed08f872dc917d8d3fc39aff58b0a0532b4cc4643
parent5243157eb10179b6fab3dd791cacc5cdd9b10396 (diff)
downloadscummvm-rg350-8638d6ce61414c8cb6ed87ef6101e6c113f97065.tar.gz
scummvm-rg350-8638d6ce61414c8cb6ed87ef6101e6c113f97065.tar.bz2
scummvm-rg350-8638d6ce61414c8cb6ed87ef6101e6c113f97065.zip
Change the AudioStream::openStreamFile API to return SeekableAudioStreams and remove parameter for depreacted loop support. (We could consider moving this to SeekableAudioStream).
svn-id: r47065
-rw-r--r--sound/audiostream.cpp7
-rw-r--r--sound/audiostream.h5
2 files changed, 4 insertions, 8 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index d92c3b793c..08b1c29491 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -55,8 +55,7 @@ struct StreamFileFormat {
* Pointer to a function which tries to open a file of type StreamFormat.
* Return NULL in case of an error (invalid/nonexisting file).
*/
- SeekableAudioStream *(*openStreamFile)(Common::SeekableReadStream *stream, bool disposeAfterUse,
- uint32 startTime, uint32 duration, uint numLoops);
+ SeekableAudioStream *(*openStreamFile)(Common::SeekableReadStream *stream, bool disposeAfterUse);
};
static const StreamFileFormat STREAM_FILEFORMATS[] = {
@@ -75,7 +74,7 @@ static const StreamFileFormat STREAM_FILEFORMATS[] = {
{ NULL, NULL, NULL } // Terminator
};
-SeekableAudioStream *AudioStream::openStreamFile(const Common::String &basename, uint32 startTime, uint32 duration, uint numLoops) {
+SeekableAudioStream *AudioStream::openStreamFile(const Common::String &basename) {
SeekableAudioStream *stream = NULL;
Common::File *fileHandle = new Common::File();
@@ -84,7 +83,7 @@ SeekableAudioStream *AudioStream::openStreamFile(const Common::String &basename,
fileHandle->open(filename);
if (fileHandle->isOpen()) {
// Create the stream object
- stream = STREAM_FILEFORMATS[i].openStreamFile(fileHandle, true, startTime, duration, numLoops);
+ stream = STREAM_FILEFORMATS[i].openStreamFile(fileHandle, true);
fileHandle = 0;
break;
}
diff --git a/sound/audiostream.h b/sound/audiostream.h
index 42bf93871b..b75b8776cc 100644
--- a/sound/audiostream.h
+++ b/sound/audiostream.h
@@ -97,10 +97,7 @@ public:
* @return an Audiostream ready to use in case of success;
* NULL in case of an error (e.g. invalid/nonexisting file)
*/
- static SeekableAudioStream *openStreamFile(const Common::String &basename,
- uint32 startTime = 0,
- uint32 duration = 0,
- uint numLoops = 1);
+ static SeekableAudioStream *openStreamFile(const Common::String &basename);
/**
* Sets number of times the stream is supposed to get looped