diff options
author | Filippos Karapetis | 2007-07-14 15:09:30 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-07-14 15:09:30 +0000 |
commit | c8a8d806e27442cad680ce1d9643d28e6b4af97c (patch) | |
tree | 6d7da1107ee622b5e0872fff2795ae69c78f1fcb /engines/saga/music.cpp | |
parent | ba3c55cd135ef50e6a025c40a330564a8f5bac9c (diff) | |
download | scummvm-rg350-c8a8d806e27442cad680ce1d9643d28e6b4af97c.tar.gz scummvm-rg350-c8a8d806e27442cad680ce1d9643d28e6b4af97c.tar.bz2 scummvm-rg350-c8a8d806e27442cad680ce1d9643d28e6b4af97c.zip |
Renamed a variable, so that it makes more sense
svn-id: r28072
Diffstat (limited to 'engines/saga/music.cpp')
-rw-r--r-- | engines/saga/music.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index a9064d270e..58a765ca4d 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -40,7 +40,7 @@ namespace Saga { class DigitalMusicInputStream : public Audio::AudioStream { private: - Audio::AudioStream *_stream; + Audio::AudioStream *_compressedStream; ResourceContext *_context; ResourceData * resourceData; GameSoundTypes soundType; @@ -86,7 +86,7 @@ DigitalMusicInputStream::DigitalMusicInputStream(SagaEngine *vm, ResourceContext error("DigitalMusicInputStream() wrong musicInfo"); } - _stream = NULL; + _compressedStream = NULL; if (vm->getFeatures() & GF_COMPRESSED_SOUNDS) { // Read compressed header to determine compression type @@ -117,7 +117,7 @@ DigitalMusicInputStream::DigitalMusicInputStream(SagaEngine *vm, ResourceContext } DigitalMusicInputStream::~DigitalMusicInputStream() { - delete _stream; + delete _compressedStream; } void DigitalMusicInputStream::createCompressedStream() { @@ -125,19 +125,19 @@ void DigitalMusicInputStream::createCompressedStream() { #ifdef USE_MAD case kSoundMP3: debug(1, "Playing MP3 compressed digital music"); - _stream = Audio::makeMP3Stream(_file, resourceData->size); + _compressedStream = Audio::makeMP3Stream(_file, resourceData->size); break; #endif #ifdef USE_VORBIS case kSoundOGG: debug(1, "Playing OGG compressed digital music"); - _stream = Audio::makeVorbisStream(_file, resourceData->size); + _compressedStream = Audio::makeVorbisStream(_file, resourceData->size); break; #endif #ifdef USE_FLAC case kSoundFLAC: debug(1, "Playing FLAC compressed digital music"); - _stream = Audio::makeFlacStream(_file, resourceData->size); + _compressedStream = Audio::makeFlacStream(_file, resourceData->size); break; #endif default: @@ -150,18 +150,18 @@ void DigitalMusicInputStream::createCompressedStream() { int DigitalMusicInputStream::readBuffer(int16 *buffer, const int numSamples) { // TODO/FIXME: Add looping support for compressed digital music - remove this once it's done // Currently, an illegal read is made, leading to a crash. Therefore, it's disabled for now - if (_stream != NULL) _looping = false; + if (_compressedStream != NULL) _looping = false; - if (!_looping && _stream != NULL) - return _stream->readBuffer(buffer, numSamples); + if (!_looping && _compressedStream != NULL) + return _compressedStream->readBuffer(buffer, numSamples); int samples = 0; while (samples < numSamples && !eosIntern()) { int len = 0; - if (_stream != NULL) { - len = _stream->readBuffer(buffer, numSamples); + if (_compressedStream != NULL) { + len = _compressedStream->readBuffer(buffer, numSamples); if (len < numSamples) { - delete _stream; + delete _compressedStream; createCompressedStream(); //_file->seek(_startPos, SEEK_SET); //_pos = 0; |