Struct Gain
pub struct Gain { /* private fields */ }Expand description
C-layout reference state, exclusively owned by the callback/firmware. Treat fields as opaque in C; initialize through the reference ABI.
Implementations§
Trait Implementations§
impl Copy for Gain
§impl Processor for Gain
impl Processor for Gain
fn prepare(&mut self, config: ProcessConfig) -> Result<(), PrepareError>
fn process(&mut self, block: &mut ProcessBlock<'_, '_, '_>) -> ProcessStatus
fn reset(&mut self)
fn deactivate(&mut self)
§fn start_audio(&mut self) -> Result<(), ProcessError>
fn start_audio(&mut self) -> Result<(), ProcessError>
Optional explicit audio-owner session start, after prepare and before
rendering. Default is a no-op. Consumers using these hooks call once on
the audio owner and stop there before transfer/deactivation. Failure must
leave this processor stopped; earlier successful nodes may be stopped.
Hooks follow prepared callback allocation/locking/I/O obligations. Existing
adapters do not implicitly opt in; explicit graph sessions supply them.
§fn stop_audio(&mut self)
fn stop_audio(&mut self)
End an explicitly started session on its audio owner, without deactivation
or storage destruction. Default no-op; preparation/history may be retained.
§fn try_reset(&mut self) -> Result<(), ProcessError>
fn try_reset(&mut self) -> Result<(), ProcessError>
Attempt history reset without allocating or changing configuration.
Existing processors delegate to their successful legacy reset by default.
A refusal may follow earlier reset work; consumers must remain faulted.
§fn latency_samples(&self) -> u32
fn latency_samples(&self) -> u32
Prepared algorithmic latency in samples. Changes are advertised by adapters
using their format’s restart/latency protocol outside the audio callback.
§fn tail(&self) -> Tail
fn tail(&self) -> Tail
Decay policy after input stops. Adapters must map this to the host protocol.
Auto Trait Implementations§
impl Freeze for Gain
impl RefUnwindSafe for Gain
impl Send for Gain
impl Sync for Gain
impl Unpin for Gain
impl UnsafeUnpin for Gain
impl UnwindSafe for Gain
Blanket Implementations§
§impl<T> BorrowMut<T> for T
impl<T> BorrowMut<T> for T
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more