Audio System
Overview
The audio system uses miniaudio for cross-platform audio playback. It supports loading and playing audio files with volume, pitch, looping, and basic 3D spatialization.
Adding Audio in the Editor
AudioSource
To add sound to an entity:
- Select the entity in the Scene Hierarchy
- In the Inspector, click Add Component > AudioSource
- Set the audio clip path, volume, pitch, and other properties
AudioListener
Attach an AudioListener component to your camera entity to define the listener position for 3D spatial audio. There should be exactly one AudioListener in the scene.
AudioSource Properties
Supported Formats
miniaudio supports WAV, MP3, FLAC, and Vorbis out of the box.
Integration Notes
- AudioEngine is initialized automatically by the Engine constructor
- Sound resources are managed internally by miniaudio