Skip to content

Commit

Permalink
sdl/audio: fix AudioStream.Available() returning error instead of int
Browse files Browse the repository at this point in the history
Signed-off-by: Lilis Iskandar <[email protected]>
  • Loading branch information
veeableful committed Dec 31, 2023
1 parent 9abea52 commit a9423c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdl/audio.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,9 @@ func (stream *AudioStream) Get(buf []byte) (n int, err error) {
}

// Available gets the number of converted/resampled bytes available
// TODO: (https://wiki.libsdl.org/SDL_AudioStreamAvailable)
func (stream *AudioStream) Available() (err error) {
ret := int(C.SDL_AudioStreamAvailable(stream.cptr()))
err = errorFromInt(ret)
// (https://wiki.libsdl.org/SDL_AudioStreamAvailable)
func (stream *AudioStream) Available() (n int) {
n = int(C.SDL_AudioStreamAvailable(stream.cptr()))
return
}

Expand Down

0 comments on commit a9423c0

Please sign in to comment.