X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Faudio%2Fstream_sound_source.cpp;h=5a0172362c4669fbc300482e55c5dd9796ed0b4c;hb=6b0c80bde84af0bf9323320d99f2fccd7c9eeedd;hp=958ef6f58f8c00960a78ead45faa419482ff1112;hpb=a113d3bd1feddd510e3b2852b0d42522735eee40;p=supertux.git diff --git a/src/audio/stream_sound_source.cpp b/src/audio/stream_sound_source.cpp index 958ef6f58..5a0172362 100644 --- a/src/audio/stream_sound_source.cpp +++ b/src/audio/stream_sound_source.cpp @@ -132,12 +132,12 @@ StreamSoundSource::fillBufferAndQueue(ALuint buffer) if(bytesread > 0) { ALenum format = SoundManager::get_sample_format(file); alBufferData(buffer, format, bufferdata, bytesread, file->rate); - delete[] bufferdata; SoundManager::check_al_error("Couldn't refill audio buffer: "); alSourceQueueBuffers(source, 1, &buffer); SoundManager::check_al_error("Couldn't queue audio buffer: "); } + delete[] bufferdata; // return false if there aren't more buffers to fill return bytesread >= STREAMFRAGMENTSIZE;