MinAudio::Sound
Constructors
new(engine : Engine, path : String, *, stream : Bool = false, async : Bool = false, group : SoundGroup | Nil = nil, fence : Pointer(Void) = Pointer(Void).null)
Internal: allocate + ma_sound_init_from_file. Raises MinAudio::Error when the file cannot be opened or decoded.
new(engine : Engine, existing : Sound, *, group : SoundGroup | Nil = nil)
Internal: copy of an existing sound (shares the underlying data).
new(engine : Engine, buffer : AudioBuffer, *, group : SoundGroup | Nil = nil)
Internal: sound over a decoded in-memory AudioBuffer (no file I/O, no re-decode — every sound shares the buffer's PCM). The buffer must outlive this sound; it is kept referenced via @buffer.
Instance methods
close
Uninit the underlying ma_sound. Safe to call twice; further port calls on this object raise.
closed?
SourceFade volume from from to to over fade_ms. from/to of -1
mean "the current volume" (miniaudio convention).
finalize
Sourcelooping?
Sourceplaying?
Source3D position (spatialization needs engine config flags upstream of this API; harmless without them).
to_unsafe
Sourcevolume
Source