class

GSDL::Audio

Inherits Reference < Object

Constructors

new(file_path : String, audio : Pointer(LibSDL3Mixer::Audio), track : Pointer(LibSDL3Mixer::Track))
Source
new(id : Symbol)
Source

Instance methods

audio
Source
category
Source
category=(tag : String)
Source
destroy
Source
file_path
Source
finished?
Source
looping
Source
looping=(value : Int32)
Source
pan=(value : Float32)
Source
pause
Source
paused?
Source
pitch
Source
pitch=(value : Float32)
Source
play(loops : Int32 = 0, overlap : Bool = false) : Int32

Plays the audio. By default, it plays on its own dedicated track (best for persistent instances). If already playing, it restarts from the beginning.

If overlap is true, it uses the AudioManager's track pool to play a new instance of this sound on a fresh channel, allowing multiple instances to layer. Returns the channel ID used (or -1 for the dedicated channel).

Source
playing?
Source
resume
Source
stop
Source
track
Source
volume
Source
volume=(value : Float32)
Source