diff options
author | Torbjörn Andersson | 2007-03-18 09:33:42 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-03-18 09:33:42 +0000 |
commit | 31bc152cc1cc49d7b117630c87d5cfc51ff88522 (patch) | |
tree | 724dae16374fb06f75286d1629b2b965ba8aecc1 | |
parent | abaef3f5af7e5edca56e805a91210648a0854680 (diff) | |
download | scummvm-rg350-31bc152cc1cc49d7b117630c87d5cfc51ff88522.tar.gz scummvm-rg350-31bc152cc1cc49d7b117630c87d5cfc51ff88522.tar.bz2 scummvm-rg350-31bc152cc1cc49d7b117630c87d5cfc51ff88522.zip |
Fixed bug that caused the music to stop. I don't know if this is a regression,
or it if was just luck that it worked before.
svn-id: r26196
-rw-r--r-- | engines/sword2/music.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index bfa65ba248..819e4164ca 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -264,6 +264,7 @@ MusicInputStream::MusicInputStream(int cd, SoundFileHandle *fh, uint32 musicId, MusicInputStream::~MusicInputStream() { delete _decoder; + _decoder = NULL; } int MusicInputStream::readBuffer(int16 *buffer, const int numSamples) { @@ -471,12 +472,8 @@ int Sound::readBuffer(int16 *buffer, const int numSamples) { } bool Sound::endOfData() const { - for (int i = 0; i < MAXMUS; i++) { - if (_musicFile[i].file.isOpen()) - return false; - } - - return true; + // The music never stops. It just goes quiet. + return false; } // ---------------------------------------------------------------------------- |