acron.audio

Audio – Godot AudioStreamPlayer / AudioStreamPlayer3D on Acron.

2D SFX/music load via loader.loadSfx / loadMusic; positional 3D sounds use Audio3DManager attached to the camera. A small SoundBank caches loaded clips so a sound file loads once. Random-pitch playback (Godot’s AudioStreamRandomizer) is supported via play(rate_jitter=..). SfxPlayers is the polyphonic counterpart: Godot game scripts’ bank of sibling one-shot AudioStreamPlayer nodes, with voice limiting.

Paths may be Godot res:// URIs (resolved via acron.res) or plain filesystem paths.

A positional sound must be MONO – see mono_source(), which every play_3d goes through.

SfxPlayers(base[, res, voices, master, loader])

Godot game scripts' polyphonic SFX pattern: a bank of voices sibling one-shot AudioStreamPlayer``s where ``play uses the FIRST idle voice and a saturated bank DROPS the sound (that voice-limit behaviour is part of how the games sound -- don't "fix" it).

SoundBank(base[, res])

Loads + caches SFX and music; plays 2D or 3D (positional).

Global Functions

mono_source(path) → Filename

path as a sound file OpenAL can spatialize – i.e. a mono one.

A mono source is returned unchanged. Anything else is decoded (through MovieAudio, so any format Acron can open counts – WAV, Ogg, FLAC), averaged down to one channel and written into the MONO_MOUNT ramdisk; the result is cached per source path, so a file is converted once per run. A file that cannot be decoded comes back unchanged, and playing it positionally then warns exactly as it did before.

This is the whole of Acron’s “stereo sound will not be spatialized” – see the note above for why the downmix is a mean.