MinAudio::Engine
Constructors
Instance methods
close
Uninit every tracked sound and the engine itself. Idempotent. The pinned context (if any) is freed AFTER the engine — miniaudio keeps the pointer.
closed?
Sourcefinalize
Sourcegroup(parent : SoundGroup | Nil = nil) : SoundGroup
A named volume/stop bus (ma_sound_group). Sounds pass group:
at creation; the master group is used when nil.
play(path : String, *, volume : Float32 | Nil = nil, loop : Bool = false, stream : Bool = false, group : SoundGroup | Nil = nil) : Sound
Prepare and immediately start a sound. loop keeps it looping.
Fire-and-forget playback: miniaudio loads, plays and reaps the sound itself — no Sound object comes back. Ideal for UI clicks.
resume
Sourcesample_rate
Sourcesound(path : String, *, stream : Bool = false, async : Bool = false, group : SoundGroup | Nil = nil) : Sound
Prepare a sound without starting it (Sound#start when wanted).
sound(buffer : AudioBuffer, *, group : SoundGroup | Nil = nil) : Sound
Prepare a sound from a decoded in-memory AudioBuffer (see AudioBuffer) without starting it. The buffer must outlive the sound — the Sound keeps it referenced, and Engine#close closes tracked sounds before the buffer is expected to go.
to_unsafe
Source