mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/vorbis: Bug fix: compilation error
This commit is contained in:
parent
70044013e9
commit
d5ca4c3953
@ -102,7 +102,7 @@ func (d *decoded) readUntil(posInBytes int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *decoded) Read(b byte) (int, error) {
|
||||
func (d *decoded) Read(b []byte) (int, error) {
|
||||
l := d.totalBytes - d.posInBytes
|
||||
if l > len(b) {
|
||||
l = len(b)
|
||||
@ -176,7 +176,7 @@ func decode(in audio.ReadSeekCloser) (*decoded, int, int, error) {
|
||||
decoder: r,
|
||||
}
|
||||
runtime.SetFinalizer(d, (*decoded).Close)
|
||||
if _, err := d.Read(make(byte, 65536)); err != nil && err != io.EOF {
|
||||
if _, err := d.Read(make([]byte, 65536)); err != nil && err != io.EOF {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
if _, err := d.Seek(0, io.SeekStart); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user