Struct Gain Processor64
pub struct GainProcessor64 { /* private fields */ }Expand description
Mono/stereo f64 reference with the existing f32 gain/bypass parameter and smoother semantics. Audio copying/multiplication and meters remain native f64; the smoother’s per-frame gain is promoted exactly. State bytes/IDs match f32. Nonfinite audio propagates through DSP and counts as silence in telemetry. Prepared processing/reset has no framework heap, lock or I/O operations.
Implementations§
§impl GainProcessor64
impl GainProcessor64
pub fn new(smoothing_ms: f64) -> Result<Self, SmoothingError>
pub fn requested_gain(&self) -> f32
pub fn effective_gain(&self) -> f32
pub fn bypassed(&self) -> bool
pub fn meters(&self) -> GainMeters64
pub fn meters(&self) -> GainMeters64
Rejected/zero-frame blocks retain the previous complete meter snapshot.
pub fn parameter_state(&self) -> ParameterState<'static, 2>
pub fn restore_parameters( &mut self, state: &ParameterState<'_, 2>, ) -> Result<(), ParameterError>
Trait Implementations§
§impl Debug for GainProcessor64
impl Debug for GainProcessor64
§impl Default for GainProcessor64
impl Default for GainProcessor64
§impl Processor<f64> for GainProcessor64
impl Processor<f64> for GainProcessor64
fn prepare(&mut self, config: ProcessConfig) -> Result<(), PrepareError>
fn process( &mut self, block: &mut ProcessBlock<'_, '_, '_, f64>, ) -> 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 GainProcessor64
impl RefUnwindSafe for GainProcessor64
impl Send for GainProcessor64
impl Sync for GainProcessor64
impl Unpin for GainProcessor64
impl UnsafeUnpin for GainProcessor64
impl UnwindSafe for GainProcessor64
Blanket Implementations§
impl<T> AutoreleaseSafe for T
§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