mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
audio/vorbis: Change the capacity of buffer
This commit is contained in:
parent
7b4af1b12d
commit
604827ed3a
@ -34,8 +34,7 @@ type decoded struct {
|
|||||||
func (d *decoded) readUntil(posInBytes int) error {
|
func (d *decoded) readUntil(posInBytes int) error {
|
||||||
c := 0
|
c := 0
|
||||||
for len(d.data) < posInBytes/2 {
|
for len(d.data) < posInBytes/2 {
|
||||||
// TODO: What if the channel is closed?
|
buffer := make([]float32, 8192)
|
||||||
buffer := make([]float32, 4096)
|
|
||||||
n, err := d.decoder.Read(buffer)
|
n, err := d.decoder.Read(buffer)
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
d.data = append(d.data, buffer[:n]...)
|
d.data = append(d.data, buffer[:n]...)
|
||||||
|
Loading…
Reference in New Issue
Block a user