From 31bc152cc1cc49d7b117630c87d5cfc51ff88522 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 18 Mar 2007 09:33:42 +0000 Subject: 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 --- engines/sword2/music.cpp | 9 +++------ 1 file 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; } // ---------------------------------------------------------------------------- -- cgit v1.2.3