euca-audio) wraps Kira for mixing: global and spatial (3D)
sources, per-bus routing, distance attenuation, reverb zones, occlusion, sound priority/concurrency, and
fading. The route logic is headless, but actual playback needs an OS audio device — not a GPU.
What it does
- Sources —
AudioSource::global()orAudioSource::spatial(clip, max_distance); volume, looping, bus assignment. - Buses —
Master/Music/Sfx/Voice/Ui, each with independent volume. - Spatial — distance attenuation (quadratic falloff) relative to an
AudioListenerentity’sGlobalTransform;ReverbZones andAudioOcclusionfor line-of-sight muffling. - Mixing policy —
AudioSettingscaps concurrent sounds and sets an occlusion factor; fading uses Kira tweens. - Fork-safe — the engine is shared as
Arc<Mutex<AudioEngine>>so a forked world reuses the same audio engine rather than cloning a device handle.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /audio/play | Load a clip and spawn an audio source (global or spatial) |
POST | /audio/stop | Stop a playing source by entity ID |
GET | /audio/list | List active sources (clip, volume, spatial flag) |
Example
Status
- ✅ Clip loading, global + spatial playback, distance attenuation, bus routing + per-bus volume, sound concurrency, fading, reverb zones, occlusion — shipped. Playback requires a host with an audio device.
Audio endpoints
Play, stop, and list endpoints with schemas.