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
This commit is contained in:
Torbjörn Andersson 2007-03-18 09:33:42 +00:00
parent abaef3f5af
commit 31bc152cc1

View File

@ -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;
}
// ----------------------------------------------------------------------------