Ugh. Fixed FlacDecoder I broke recently.

This commit is contained in:
casey langen 2017-01-01 14:58:23 -08:00
parent f57abafb42
commit f34b2c87c2

View File

@ -233,7 +233,7 @@ bool FlacDecoder::GetBuffer(IBuffer *buffer) {
if (FLAC__stream_decoder_process_single(this->decoder)) {
if (this->outputBuffer && this->outputBufferUsed > 0) {
buffer->SetSamples(this->outputBufferUsed);
memcpy(buffer->BufferPointer(), this->outputBuffer, this->outputBufferUsed);
memcpy(buffer->BufferPointer(), this->outputBuffer, this->outputBufferUsed * sizeof(float));
this->outputBufferUsed = 0; /* mark consumed */
return true;
}