Fix broken wav decoding on partial decodes, seemed to mostly/only affect 8-bit wav

This commit is contained in:
Bart van Strien
2015-05-17 19:52:31 +02:00
parent 30b083bd23
commit 2a33af3920
+2 -2
View File
@@ -126,8 +126,8 @@ int WaveDecoder::decode()
while (size < (size_t) bufferSize) while (size < (size_t) bufferSize)
{ {
size_t bytes = bufferSize; size_t bytes = bufferSize-size;
int wuff_status = wuff_read(handle, (wuff_uint8 *) buffer, &bytes); int wuff_status = wuff_read(handle, (wuff_uint8 *) buffer+size, &bytes);
if (wuff_status < 0) if (wuff_status < 0)
return 0; return 0;