#[repr(C)]pub struct AudioSample {
pub handle: i32,
pub samplerate: i32,
}
Fields§
§handle: i32
§samplerate: i32
Implementations§
Source§impl AudioSample
impl AudioSample
Sourcepub fn create_s8(pcm_data: &[i8], samplerate: i32) -> Result<AudioSample, ()>
pub fn create_s8(pcm_data: &[i8], samplerate: i32) -> Result<AudioSample, ()>
Create a new signed 8-bit PCM audio sample
Sourcepub fn create_s16(pcm_data: &[i16], samplerate: i32) -> Result<AudioSample, ()>
pub fn create_s16(pcm_data: &[i16], samplerate: i32) -> Result<AudioSample, ()>
Create a new signed 16-bit PCM audio sample
Sourcepub fn create_adpcm(
adpcm_data: &[u8],
chunk_size: i32,
samplerate: i32,
) -> Result<AudioSample, ()>
pub fn create_adpcm( adpcm_data: &[u8], chunk_size: i32, samplerate: i32, ) -> Result<AudioSample, ()>
Create a new IMA ADPCM encoded audio sample
Trait Implementations§
Source§impl Clone for AudioSample
impl Clone for AudioSample
Source§fn clone(&self) -> AudioSample
fn clone(&self) -> AudioSample
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 moreAuto Trait Implementations§
impl Freeze for AudioSample
impl RefUnwindSafe for AudioSample
impl Send for AudioSample
impl Sync for AudioSample
impl Unpin for AudioSample
impl UnwindSafe for AudioSample
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