pub struct AudioRoute {
pub from: String,
pub to: String,
pub volume: f32,
pub pan: f32,
pub kind: AudioRouteKind,
pub effect_params: Option<Value>,
pub sidechain: Option<SidechainParam>,
}Expand description
Audio route: explicit connection between nodes
Fields§
§from: StringSource node ID
to: StringDestination node ID
volume: f32Volume scaling (0.0 to 1.0+)
pan: f32Pan (-1.0 to 1.0: left to right)
kind: AudioRouteKindRoute behavior
effect_params: Option<Value>Optional routing/effect parameters from the DSL
sidechain: Option<SidechainParam>Optional sidechain/ducking
Implementations§
Source§impl AudioRoute
impl AudioRoute
Sourcepub fn new(from: impl Into<String>, to: impl Into<String>) -> Self
pub fn new(from: impl Into<String>, to: impl Into<String>) -> Self
Create new route from source to destination
Sourcepub fn duck(
from: impl Into<String>,
to: impl Into<String>,
params: Value,
) -> Self
pub fn duck( from: impl Into<String>, to: impl Into<String>, params: Value, ) -> Self
Create a ducking route.
Sourcepub fn sidechain(
from: impl Into<String>,
to: impl Into<String>,
params: Value,
) -> Self
pub fn sidechain( from: impl Into<String>, to: impl Into<String>, params: Value, ) -> Self
Create a sidechain route.
Sourcepub fn with_volume(self, vol: f32) -> Self
pub fn with_volume(self, vol: f32) -> Self
Set route volume
Sourcepub fn with_sidechain(self, mode: SidechainMode, amount: f32) -> Self
pub fn with_sidechain(self, mode: SidechainMode, amount: f32) -> Self
Add sidechain ducking
Trait Implementations§
Source§impl Clone for AudioRoute
impl Clone for AudioRoute
Auto Trait Implementations§
impl Freeze for AudioRoute
impl RefUnwindSafe for AudioRoute
impl Send for AudioRoute
impl Sync for AudioRoute
impl Unpin for AudioRoute
impl UnsafeUnpin for AudioRoute
impl UnwindSafe for AudioRoute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more