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
Sourcepub fn vaio(&self) -> BoolParameter<'_>
pub fn vaio(&self) -> BoolParameter<'_>
VAIO output enable/disable.
§Notes requires VAIO extension
Auto Trait Implementations§
impl<'a> Freeze for Bus<'a>
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