euv_core/game/audio_output/enum.rs
1/// Active execution driver backing `AudioOutputBackend`.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum AudioDriverKind {
4 /// Deterministic cross-platform pull-mode software PCM mixer (headless, WebAudio worklet, tests).
5 #[default]
6 PullMixer,
7 /// Native macOS CoreAudio AUHAL (`AudioToolbox`) hardware output driver.
8 CoreAudioAuhal,
9}
10
11/// Lifecycle state of an `AudioOutputBackend` instance.
12#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
13pub enum AudioOutputState {
14 /// Output backend is initialized but stopped.
15 #[default]
16 Stopped,
17 /// Output backend is actively mixing or streaming audio frames.
18 Running,
19 /// Output backend is paused without dropping active voices.
20 Paused,
21}
22
23/// Error returned when initializing or starting a native OS audio output driver.
24#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
25pub enum AudioOutputError {
26 /// No native OS audio output driver is implemented or available for this host target.
27 DriverUnavailable,
28 /// Native audio component lookup, format configuration, or initialization failed with an OS status code.
29 InitializationFailed(i32),
30 /// Native audio output unit failed to start streaming with an OS status code.
31 StartFailed(i32),
32}