Report proper number of samples on Read
This commit is contained in:
parent
9103da68c3
commit
872fc94825
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue