Struct WaveWriter

Source
pub struct WaveWriter<'a> {
Show 14 fields pub fmt__chunk: FmtChunk, pub slnt_chunk: Option<SlntChunk>, pub bext_chunk: Option<BextChunk>, pub smpl_chunk: Option<SmplChunk>, pub inst_chunk: Option<InstChunk>, pub plst_chunk: Option<PlstChunk>, pub cue__chunk: Option<CueChunk>, pub axml_chunk: Option<String>, pub ixml_chunk: Option<String>, pub list_chunk: Option<ListChunk>, pub acid_chunk: Option<AcidChunk>, pub trkn_chunk: Option<String>, pub id3__chunk: Option<Tag>, pub junk_chunks: Vec<JunkChunk>, /* private fields */
}

Fields§

§fmt__chunk: FmtChunk§slnt_chunk: Option<SlntChunk>§bext_chunk: Option<BextChunk>§smpl_chunk: Option<SmplChunk>§inst_chunk: Option<InstChunk>§plst_chunk: Option<PlstChunk>§cue__chunk: Option<CueChunk>§axml_chunk: Option<String>§ixml_chunk: Option<String>§list_chunk: Option<ListChunk>§acid_chunk: Option<AcidChunk>§trkn_chunk: Option<String>§id3__chunk: Option<Tag>§junk_chunks: Vec<JunkChunk>

Implementations§

Source§

impl<'a> WaveWriter<'a>

Source

pub fn create<P: AsRef<Path>>( filename: P, spec: &Spec, data_format: DataFormat, file_size_option: FileSizeOption, ) -> Result<WaveWriter<'a>, AudioWriteError>

Source

pub fn from( writer: Box<dyn Writer + 'a>, spec: &Spec, data_format: DataFormat, file_size_option: FileSizeOption, ) -> Result<WaveWriter<'a>, AudioWriteError>

Source

pub fn write_samples<S>(&mut self, samples: &[S]) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_sample<S>(&mut self, mono: S) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_mono_channel<S>( &mut self, monos: &[S], ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_monos<S>( &mut self, monos: &[Vec<S>], ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_stereo<S>(&mut self, stereo: (S, S)) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_stereos<S>( &mut self, stereos: &[(S, S)], ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_dual_mono<S>( &mut self, mono1: S, mono2: S, ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_dual_monos<S>( &mut self, mono1: &[S], mono2: &[S], ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_frame<S>(&mut self, frame: &[S]) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn write_frames<S>( &mut self, frames: &[Vec<S>], ) -> Result<(), AudioWriteError>
where S: SampleType,

Source

pub fn spec(&self) -> &Spec

Source

pub fn get_data_format(&self) -> DataFormat

Source

pub fn get_num_frames_written(&self) -> u64

Source

pub fn set_bext_chunk(&mut self, chunk: &BextChunk)

Source

pub fn set_smpl_chunk(&mut self, chunk: &SmplChunk)

Source

pub fn set_inst_chunk(&mut self, chunk: &InstChunk)

Source

pub fn set_plst_chunk(&mut self, chunk: &PlstChunk)

Source

pub fn set_cue__chunk(&mut self, chunk: &CueChunk)

Source

pub fn set_axml_chunk(&mut self, chunk: &String)

Source

pub fn set_ixml_chunk(&mut self, chunk: &String)

Source

pub fn set_list_chunk(&mut self, chunk: &ListChunk)

Source

pub fn set_acid_chunk(&mut self, chunk: &AcidChunk)

Source

pub fn set_trkn_chunk(&mut self, chunk: &String)

Source

pub fn add_junk_chunk(&mut self, chunk: &JunkChunk)

Source

pub fn inherit_metadata_from_reader( &mut self, reader: &WaveReader, include_junk_chunks: bool, )

Source

pub fn create_full_info_cue_data( &self, ) -> Result<BTreeMap<u32, FullInfoCuePoint>, AudioError>

Source

pub fn finalize(self)

Trait Implementations§

Source§

impl<'a> Debug for WaveWriter<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for WaveWriter<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for WaveWriter<'a>

§

impl<'a> !RefUnwindSafe for WaveWriter<'a>

§

impl<'a> !Send for WaveWriter<'a>

§

impl<'a> !Sync for WaveWriter<'a>

§

impl<'a> Unpin for WaveWriter<'a>

§

impl<'a> !UnwindSafe for WaveWriter<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.