mirror of
https://github.com/love2d/love.git
synced 2026-08-21 13:09:56 +02:00
Fix broken wav decoding on partial decodes, seemed to mostly/only affect 8-bit wav
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user