Trait audio_core::ChannelsMut [−][src]
A trait describing a mutable audio buffer.
Required methods
fn channel_mut(&mut self, channel: usize) -> ChannelMut<'_, T>
[src]
Return a mutable handler to the buffer associated with the channel.
Panics
Panics if the specified channel is out of bound as reported by Buf::channels.
fn copy_channels(&mut self, from: usize, to: usize) where
T: Copy,
[src]
T: Copy,
Copy one channel into another.
If the channels have different sizes, the minimul difference between them will be copied.
Panics
Panics if one of the channels being tried to copy from or to is out of bounds as reported by Buf::channels.
Examples
use audio::{Channels, ChannelsMut}; let mut buffer: audio::Dynamic<i16> = audio::dynamic![[1, 2, 3, 4], [0, 0, 0, 0]]; buffer.copy_channels(0, 1); assert_eq!(buffer.channel(1), buffer.channel(0));
Implementations on Foreign Types
impl<B: ?Sized, T> ChannelsMut<T> for &mut B where
B: ChannelsMut<T>,
[src]
B: ChannelsMut<T>,
fn channel_mut(&mut self, channel: usize) -> ChannelMut<'_, T>
[src]
fn copy_channels(&mut self, from: usize, to: usize) where
T: Copy,
[src]
T: Copy,
impl<T> ChannelsMut<T> for Vec<Vec<T>> where
T: Copy,
[src]
T: Copy,