diff --git a/minimp3.go b/minimp3.go index bdb3e78..f830e02 100755 --- a/minimp3.go +++ b/minimp3.go @@ -67,7 +67,7 @@ func (d *Decoder) Read(p []float32) (int, error) { // If there is any data left in the pcm buffer, then move it to the beginning of the buffer copy(d.pcm, d.pcm[n:d.pcmLength/C.sizeof_float]) d.pcmLength -= n * C.sizeof_float - return n / C.sizeof_float, nil + return n, nil } // Seek sets a new position for reading audio data.