Audio
Brine2D¶
Brine2D.Audio Namespace¶
| Classes | |
|---|---|
| AudioOptions | Configuration options for the audio system. |
| AudioService | SDL3_mixer implementation of audio service with spatial audio support and proper callbacks. |
| HeadlessAudioService | No-op audio service for headless mode (servers, testing). All audio operations are silently ignored. Volume properties are initialised from AudioOptions so configured values are observable in tests. |
| SDL3AudioAsset | Base class for SDL3_mixer audio assets (sound effects and music). Handles native audio handle lifetime and thread-safe disposal. |
| SDL3Music | SDL3_mixer implementation of a music track for background audio playback. |
| SDL3SoundEffect | SDL3_mixer implementation of a sound effect. |
| Structs | |
|---|---|
| MusicFade | Explicit state for the music fade state machine, replacing the implicit mode inference from track handle combinations. Used by both AudioService and HeadlessAudioService. |
| Interfaces | |
|---|---|
| IAudioPlayer | Audio playback and volume control. |
| IAudioService | Composite audio service combining loading and playback. Prefer depending on the narrower ISoundLoader, IMusicLoader, or IAudioPlayer interfaces when only a subset of functionality is needed. |
| IMusic | Represents streaming music (typically for background music). |
| IMusicLoader | Low-level music loading interface. For most use cases, use |
| ISoundEffect | Represents a loaded sound effect. |
| ISoundLoader | Low-level sound effect loading interface. For most use cases, use |