diff --git a/audio/mp3/decode_notjs.go b/audio/mp3/decode_notjs.go index 6ee24768c..43d3a6310 100644 --- a/audio/mp3/decode_notjs.go +++ b/audio/mp3/decode_notjs.go @@ -50,6 +50,7 @@ func Get_Byte() C.unsigned { for len(readerCache) == 0 && !readerEOF { buf := make([]uint8, 4096) n, err := reader.Read(buf) + readerCache = append(readerCache, buf[:n]...) if err != nil { if err == io.EOF { readerEOF = true @@ -57,7 +58,6 @@ func Get_Byte() C.unsigned { panic(err) } } - readerCache = buf[:n] } if len(readerCache) == 0 { return eof