pub struct WavEncoder<B: WavBitDepth + 'static> { /* private fields */ }

Trait Implementations§

source§

impl<B: WavBitDepth + 'static> Encoder for WavEncoder<B>

§

type T = <B as WavBitDepth>::T

The data type of a single sample. (i.e. f32)
§

type AdditionalOpts = ()

Any additional options for creating a file with this encoder.
§

type FileParams = Params

Any additional information on the file.
§

type OpenError = WavOpenError

The error type while opening the file.
§

type FatalError = WavFatalError

The error type when a fatal error occurs.
source§

const DEFAULT_BLOCK_SIZE: usize = 32_768usize

The default number of frames in a write block.
source§

const DEFAULT_NUM_WRITE_BLOCKS: usize = 8usize

The default number of write blocks. This must be sufficiently large to ensure there are enough write blocks for the client in the worst case write latency scenerio.
source§

fn new( path: PathBuf, num_channels: u16, sample_rate: u32, block_size: usize, _num_write_blocks: usize, _additional_opts: Self::AdditionalOpts ) -> Result<(Self, FileInfo<Self::FileParams>), Self::OpenError>

Open the file for writing. Read more
source§

fn encode( &mut self, write_block: &WriteBlock<Self::T> ) -> Result<WriteStatus, Self::FatalError>

Write a block of data to the file. Read more
source§

fn finish_file(&mut self) -> Result<(), Self::FatalError>

Finish up the file and then close it.
source§

fn discard_file(&mut self) -> Result<(), Self::FatalError>

Delete all created files. Do not start over.
source§

fn discard_and_restart(&mut self) -> Result<(), Self::FatalError>

Delete all created files and start over from the beginning.

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for WavEncoder<B>

§

impl<B> Send for WavEncoder<B>
where B: Send,

§

impl<B> Sync for WavEncoder<B>
where B: Sync, <B as WavBitDepth>::T: Sync,

§

impl<B> Unpin for WavEncoder<B>
where B: Unpin, <B as WavBitDepth>::T: Unpin,

§

impl<B> UnwindSafe for WavEncoder<B>
where B: UnwindSafe, <B as WavBitDepth>::T: UnwindSafe,

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>,

§

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>,

§

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.