[Scummvm-cvs-logs] SF.net SVN: scummvm:[47080] scummvm/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Jan 6 16:23:33 CET 2010
Revision: 47080
http://scummvm.svn.sourceforge.net/scummvm/?rev=47080&view=rev
Author: lordhoto
Date: 2010-01-06 15:23:33 +0000 (Wed, 06 Jan 2010)
Log Message:
-----------
- Move openStreamFile from AudioStream to SeekableAudioStream.
- Fix documentation of openStreamFile.
Modified Paths:
--------------
scummvm/trunk/engines/agos/animation.cpp
scummvm/trunk/engines/saga/music.cpp
scummvm/trunk/engines/sword1/animation.cpp
scummvm/trunk/engines/sword2/animation.cpp
scummvm/trunk/sound/audiocd.cpp
scummvm/trunk/sound/audiostream.cpp
scummvm/trunk/sound/audiostream.h
Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/engines/agos/animation.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -308,7 +308,7 @@
_bgSoundStream = Audio::makeWAVStream(_fileStream->readStream(size), true);
}
} else {
- _bgSoundStream = Audio::AudioStream::openStreamFile(baseName);
+ _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(baseName);
}
if (_bgSoundStream != NULL) {
Modified: scummvm/trunk/engines/saga/music.cpp
===================================================================
--- scummvm/trunk/engines/saga/music.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/engines/saga/music.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -277,7 +277,7 @@
sprintf(trackName[1], "track%02d", realTrackNumber);
Audio::SeekableAudioStream *stream = 0;
for (int i = 0; i < 2; ++i) {
- stream = Audio::AudioStream::openStreamFile(trackName[i]);
+ stream = Audio::SeekableAudioStream::openStreamFile(trackName[i]);
if (stream) {
_mixer->playInputStreamLooping(Audio::Mixer::kMusicSoundType, &_musicHandle, stream, (flags == MUSIC_LOOP) ? 0 : 1);
_digitalMusic = true;
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/engines/sword1/animation.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -87,7 +87,7 @@
char filename[20];
if (_decoderType == kVideoDecoderDXA) {
- _bgSoundStream = Audio::AudioStream::openStreamFile(sequenceList[id]);
+ _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(sequenceList[id]);
} else {
_bgSoundStream = NULL;
}
Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/engines/sword2/animation.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -63,7 +63,7 @@
*/
bool MoviePlayer::load(const char *name) {
if (_decoderType == kVideoDecoderDXA) {
- _bgSoundStream = Audio::AudioStream::openStreamFile(name);
+ _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(name);
} else {
_bgSoundStream = NULL;
}
Modified: scummvm/trunk/sound/audiocd.cpp
===================================================================
--- scummvm/trunk/sound/audiocd.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/sound/audiocd.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -69,7 +69,7 @@
repetitions. Finally, -1 means infinitely many
*/
// We multiply by 40 / 3 = 1000 / 75 to convert frames to milliseconds
- stream = AudioStream::openStreamFile(trackName[i]);
+ stream = SeekableAudioStream::openStreamFile(trackName[i]);
}
// Stop any currently playing emulated track
Modified: scummvm/trunk/sound/audiostream.cpp
===================================================================
--- scummvm/trunk/sound/audiostream.cpp 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/sound/audiostream.cpp 2010-01-06 15:23:33 UTC (rev 47080)
@@ -74,7 +74,7 @@
{ NULL, NULL, NULL } // Terminator
};
-SeekableAudioStream *AudioStream::openStreamFile(const Common::String &basename) {
+SeekableAudioStream *SeekableAudioStream::openStreamFile(const Common::String &basename) {
SeekableAudioStream *stream = NULL;
Common::File *fileHandle = new Common::File();
Modified: scummvm/trunk/sound/audiostream.h
===================================================================
--- scummvm/trunk/sound/audiostream.h 2010-01-06 14:04:56 UTC (rev 47079)
+++ scummvm/trunk/sound/audiostream.h 2010-01-06 15:23:33 UTC (rev 47080)
@@ -84,21 +84,6 @@
*/
virtual bool endOfStream() const { return endOfData(); }
- /**
- * Tries to load a file by trying all available formats.
- * In case of an error, the file handle will be closed, but deleting
- * it is still the responsibilty of the caller.
- * @param basename a filename without an extension
- * @param startTime the (optional) time offset in milliseconds from which
- * to start playback
- * @param duration the (optional) time in milliseconds specifying how long
- to play
- * @param numLoops how often the data shall be looped (0 = infinite)
- * @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);
-
/**
* Sets number of times the stream is supposed to get looped
* This also resets the number of loops played counter, which
@@ -124,6 +109,16 @@
class SeekableAudioStream : public AudioStream {
public:
/**
+ * Tries to load a file by trying all available formats.
+ * In case of an error, the file handle will be closed, but deleting
+ * it is still the responsibilty of the caller.
+ * @param basename a filename without an extension
+ * @return an SeekableAudioStream 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);
+
+ /**
* Seeks to a given offset in the stream.
*
* @param where offset in milliseconds
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