pub struct SystemEffect {
pub id: Clsid,
pub controllable: bool,
pub state: SystemEffectState,
}Expand description
One system effect this APO advertises to the audio engine via
IAudioSystemEffects2::GetEffectsList and (when this APO
supports per-effect toggling) IAudioSystemEffects3::GetControllableSystemEffectsList.
The Windows audio engine surfaces these in the Sound Settings
UI; users can see the effect by name (resolved via the
per-effect ID in the audio property store) and — for effects
marked controllable — toggle each independently.
The framework’s default ProcessingObject::system_effects
returns an empty slice, so an APO advertises no enumerable
effects unless it overrides the method. That matches the
historical behaviour of a v1-only IAudioSystemEffects marker.
Fields§
§id: ClsidUnique identifier for this effect within the APO. The audio
engine pairs this with the friendly name in the per-endpoint
AudioSystemEffects_PropertyStore to render the UI.
controllable: booltrue if the audio engine may call
SetAudioSystemEffectState on this effect at runtime.
false means the effect is always on and the Sound Settings
UI hides the toggle.
state: SystemEffectStateInitial state of the effect, also surfaced through
GetControllableSystemEffectsList.
Implementations§
Source§impl SystemEffect
impl SystemEffect
Sourcepub const fn new(id: Clsid) -> Self
pub const fn new(id: Clsid) -> Self
Construct an effect descriptor from its unique ID. Defaults
to non-controllable, On state — the v1/v2 behaviour where
effects are always-on markers in the discovery list.
Sourcepub const fn with_controllable(self, controllable: bool) -> Self
pub const fn with_controllable(self, controllable: bool) -> Self
Builder-style: mark this effect as user-controllable.
Sourcepub const fn with_state(self, state: SystemEffectState) -> Self
pub const fn with_state(self, state: SystemEffectState) -> Self
Builder-style: set the initial state.
Trait Implementations§
Source§impl Clone for SystemEffect
impl Clone for SystemEffect
Source§fn clone(&self) -> SystemEffect
fn clone(&self) -> SystemEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemEffect
impl Debug for SystemEffect
Source§impl Hash for SystemEffect
impl Hash for SystemEffect
Source§impl PartialEq for SystemEffect
impl PartialEq for SystemEffect
Source§fn eq(&self, other: &SystemEffect) -> bool
fn eq(&self, other: &SystemEffect) -> bool
self and other values to be equal, and is used by ==.