audio/vorbis: Change the capacity of buffer

This commit is contained in:
Hajime Hoshi 2016-11-29 12:12:48 +09:00
parent 7b4af1b12d
commit 604827ed3a

View File

@ -34,8 +34,7 @@ type decoded struct {
func (d *decoded) readUntil(posInBytes int) error {
c := 0
for len(d.data) < posInBytes/2 {
// TODO: What if the channel is closed?
buffer := make([]float32, 4096)
buffer := make([]float32, 8192)
n, err := d.decoder.Read(buffer)
if n > 0 {
d.data = append(d.data, buffer[:n]...)