MCPcopy Create free account
hub / github.com/PerroEngine/Perro / new

Method new

perro_source/audio_stack/perro_pawdio/src/dsp.rs:22–35  ·  view source on GitHub ↗
(params: DspParams)

Source from the content-addressed store, hash-verified

20 // `DspSource::new`, so a later wet switch can size delay lines without
21 // reaching into the source. 0 = no source attached yet.
22 layout: AtomicU64,
23 // Delay lines the worker parks for a dry source to install at its next
24 // dry->wet edge. `try_lock` only on the audio thread: it takes, never
25 // blocks and never allocates.
26 pending_wet: Mutex<Option<Box<WetDelays>>>,
27}
28
29impl DspControl {
30 pub(crate) fn new(params: DspParams) -> Arc<Self> {
31 Arc::new(Self {
32 low_pass: AtomicU32::new(params.low_pass.to_bits()),
33 reverb_send: AtomicU32::new(params.reverb_send.to_bits()),
34 echo: AtomicU32::new(params.echo.to_bits()),
35 reflection: AtomicU32::new(params.reflection.to_bits()),
36 occlusion: AtomicU32::new(params.occlusion.to_bits()),
37 eq_low_gain: AtomicU32::new(params.eq.low_gain.to_bits()),
38 eq_mid_gain: AtomicU32::new(params.eq.mid_gain.to_bits()),

Callers

nothing calls this directly

Calls 4

delay_lenFunction · 0.85
maxMethod · 0.45
channelsMethod · 0.45
sample_rateMethod · 0.45

Tested by

no test coverage detected