Skip to content

Commit 0d8cdba

Browse files
committed
oto: improve error message
1 parent 0ff059e commit 0d8cdba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

player.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package oto
1616

1717
import (
18+
"fmt"
19+
1820
"github.com/ebitengine/oto/v3/internal/mux"
1921
)
2022

@@ -63,7 +65,7 @@ func (p *Player) BufferedSize() int {
6365

6466
// Err returns an error if this player has an error.
6567
func (p *Player) Err() error {
66-
return p.player.Err()
68+
return fmt.Errorf("oto: audio error: %w", p.player.Err())
6769
}
6870

6971
// SetBufferSize sets the buffer size.

0 commit comments

Comments
 (0)