pub struct AudioBuffer {
pub data: Vec<f32>,
pub final_size: bool,
pub frame_count: usize,
pub channel_count: usize,
}
Fields§
§data: Vec<f32>
§final_size: bool
§frame_count: usize
§channel_count: usize
Implementations§
Source§impl AudioBuffer
impl AudioBuffer
pub fn from_data(data: Vec<f32>, channel_count: usize) -> AudioBuffer
pub fn from_i16(inp: &[i16], channel_count: usize) -> AudioBuffer
pub fn make_single_channel(&mut self)
pub fn into_data(self) -> Vec<f32>
pub fn to_i16(&self) -> Vec<i16>
pub fn new_with_size(frame_count: usize, channel_count: usize) -> AudioBuffer
pub fn new_like(like: &AudioBuffer) -> AudioBuffer
pub fn frame_count(&self) -> usize
pub fn channel_count(&self) -> usize
pub fn copy_from(&mut self, like: &AudioBuffer) -> &mut AudioBuffer
pub fn resize_like(&mut self, like: &AudioBuffer) -> &mut AudioBuffer
pub fn resize(&mut self, frame_count: usize, channel_count: usize)
pub fn clear_final_size(&mut self)
pub fn set_final_size(&mut self)
pub fn stereo_mut(&mut self) -> (&mut [f32], &mut [f32])
pub fn stereo(&self) -> (&[f32], &[f32])
pub fn channel_mut(&mut self, channel: usize) -> &mut [f32]
pub fn channel(&self, channel: usize) -> &[f32]
pub fn zero(&mut self)
pub fn copy_from_interleaved( &mut self, channel_count: usize, interleaved: &[f32], )
pub fn copy_to_interleaved(&self, interleaved: &mut [f32])
Trait Implementations§
Source§impl Clone for AudioBuffer
impl Clone for AudioBuffer
Source§fn clone(&self) -> AudioBuffer
fn clone(&self) -> AudioBuffer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AudioBuffer
impl Debug for AudioBuffer
Source§impl Default for AudioBuffer
impl Default for AudioBuffer
Source§fn default() -> AudioBuffer
fn default() -> AudioBuffer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AudioBuffer
impl RefUnwindSafe for AudioBuffer
impl Send for AudioBuffer
impl Sync for AudioBuffer
impl Unpin for AudioBuffer
impl UnwindSafe for AudioBuffer
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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