Struct voicemeeter::interface::callback::data::input::WriteDevices
source · pub struct WriteDevices<'a, 'b> {
pub strip1: DeviceBuffer<[&'b mut [f32]; 2]>,
pub strip2: DeviceBuffer<[&'b mut [f32]; 2]>,
pub strip3: DeviceBuffer<[&'b mut [f32]; 2]>,
pub strip4: DeviceBuffer<[&'b mut [f32]; 2]>,
pub strip5: DeviceBuffer<[&'b mut [f32]; 2]>,
pub virtual_input: DeviceBuffer<[&'b mut [f32]; 8]>,
pub virtual_input_aux: DeviceBuffer<[&'b mut [f32]; 8]>,
pub virtual_input8: DeviceBuffer<[&'b mut [f32]; 8]>,
/* private fields */
}
Available on crate feature
interface
only.Expand description
Write interface for input mode
Fields§
§strip1: DeviceBuffer<[&'b mut [f32]; 2]>
§strip2: DeviceBuffer<[&'b mut [f32]; 2]>
§strip3: DeviceBuffer<[&'b mut [f32]; 2]>
§strip4: DeviceBuffer<[&'b mut [f32]; 2]>
§strip5: DeviceBuffer<[&'b mut [f32]; 2]>
§virtual_input: DeviceBuffer<[&'b mut [f32]; 8]>
Channel write buffer for VirtualInput
.
Is None
if the device is not available.
virtual_input_aux: DeviceBuffer<[&'b mut [f32]; 8]>
Channel write buffer for VirtualInputAux
.
Is None
if the device is not available.
virtual_input8: DeviceBuffer<[&'b mut [f32]; 8]>
Channel write buffer for VirtualInput8
.
Is None
if the device is not available.
Implementations§
source§impl<'a, 'b> WriteDevices<'a, 'b>
impl<'a, 'b> WriteDevices<'a, 'b>
sourcepub fn copy_device_from<'i>(
&mut self,
read: &ReadDevices<'_, '_>,
devices: impl IntoIterator<Item = &'i Device>
)
pub fn copy_device_from<'i>( &mut self, read: &ReadDevices<'_, '_>, devices: impl IntoIterator<Item = &'i Device> )
Copies data from a input read buffer into the input write buffer for specified devices
§Examples
use voicemeeter::{interface::callback::BufferInData, types::Device};
buffer
.write
.copy_device_from(&buffer.read, &[Device::Strip1, Device::Strip2]);
assert!(
buffer.read.strip1.to_slice() == buffer.write.strip1.to_mut_slice(),
"strip1 was copied"
);
assert!(
buffer.read.strip2.to_slice() == buffer.write.strip2.to_mut_slice(),
"strip2 was copied"
);
sourcepub fn device_mut(
&mut self,
device: &Device
) -> DeviceBuffer<&mut [&'b mut [f32]]>
pub fn device_mut( &mut self, device: &Device ) -> DeviceBuffer<&mut [&'b mut [f32]]>
Grab the device buffer for a specific device
Trait Implementations§
source§impl<'a, 'b> Default for WriteDevices<'a, 'b>
impl<'a, 'b> Default for WriteDevices<'a, 'b>
source§fn default() -> WriteDevices<'a, 'b>
fn default() -> WriteDevices<'a, 'b>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, 'b> RefUnwindSafe for WriteDevices<'a, 'b>
impl<'a, 'b> Send for WriteDevices<'a, 'b>
impl<'a, 'b> Sync for WriteDevices<'a, 'b>
impl<'a, 'b> Unpin for WriteDevices<'a, 'b>
impl<'a, 'b> !UnwindSafe for WriteDevices<'a, 'b>
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