Struct voicemeeter::interface::parameters::bus::Bus
source · pub struct Bus<'a> { /* private fields */ }
Available on crate feature
interface
only.Expand description
Parameters for a bus.
A bus is a output.
Returned by VoicemeeterRemote::parameters().bus(i)
§Example
use voicemeeter::VoicemeeterRemote;
// Get the client.
let remote = VoicemeeterRemote::new()?;
// Get the label of bus A1 (index 0)
println!("{}", remote.parameters().bus(0)?.label().get()?);
// Mute bus A4 (index 5)
remote.parameters().bus(2)?.mute().set(true)?;
// Ensure the change is registered.
remote.is_parameters_dirty()?;
// We need to sleep here because otherwise changes won't be registered,
// in a long running program this is not needed.
std::thread::sleep(std::time::Duration::from_millis(50));
Implementations§
source§impl<'a> Bus<'a>
impl<'a> Bus<'a>
sourcepub fn param(&self, dot: impl ToString) -> Cow<'static, ParameterNameRef>
pub fn param(&self, dot: impl ToString) -> Cow<'static, ParameterNameRef>
Get the identifier for a parameter on this bus: Bus[i].{dot}
sourcepub fn label(&self) -> StringParameter<'_>
pub fn label(&self) -> StringParameter<'_>
Label
sourcepub fn mono(&self) -> IntParameter<'_>
pub fn mono(&self) -> IntParameter<'_>
Mono Button
sourcepub fn mute(&self) -> BoolParameter<'_>
pub fn mute(&self) -> BoolParameter<'_>
Mute Button
sourcepub fn eq_on(&self) -> BoolParameter<'_>
pub fn eq_on(&self) -> BoolParameter<'_>
EQ Button
sourcepub fn eq_ab(&self) -> BoolParameter<'_>
pub fn eq_ab(&self) -> BoolParameter<'_>
EQ Memory Slot
sourcepub fn gain(&self) -> FloatParameter<'_>
pub fn gain(&self) -> FloatParameter<'_>
Gain slider
sourcepub fn mode(&self) -> BusModeParameter<'_>
pub fn mode(&self) -> BusModeParameter<'_>
Bus mode Normal
sourcepub fn eq(&self, channel: usize) -> EqChannelParameter<'_>
pub fn eq(&self, channel: usize) -> EqChannelParameter<'_>
EQ on channel
sourcepub fn fade_to(&self) -> TupleParameter<'_, f32, usize>
pub fn fade_to(&self) -> TupleParameter<'_, f32, usize>
Fade to
sourcepub fn fade_by(&self) -> TupleParameter<'_, f32, usize>
pub fn fade_by(&self) -> TupleParameter<'_, f32, usize>
Fade by
sourcepub fn sel(&self) -> BoolParameter<'_>
pub fn sel(&self) -> BoolParameter<'_>
BUS SEL Button
sourcepub fn return_reverb(&self) -> IntParameter<'_>
pub fn return_reverb(&self) -> IntParameter<'_>
Reverb return
sourcepub fn return_delay(&self) -> IntParameter<'_>
pub fn return_delay(&self) -> IntParameter<'_>
Delay return
sourcepub fn return_fx1(&self) -> IntParameter<'_>
pub fn return_fx1(&self) -> IntParameter<'_>
Fx1 Return
sourcepub fn return_fx2(&self) -> IntParameter<'_>
pub fn return_fx2(&self) -> IntParameter<'_>
Fx2 Return
sourcepub fn monitor(&self) -> BoolParameter<'_>
pub fn monitor(&self) -> BoolParameter<'_>
Monitor
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Bus<'a>
impl<'a> Send for Bus<'a>
impl<'a> Sync for Bus<'a>
impl<'a> Unpin for Bus<'a>
impl<'a> UnwindSafe for Bus<'a>
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