pub struct NativeWavEncodeSink { /* private fields */ }Expand description
Transactional IEEE-f32 WAV encoder used by native offline audio export.
Implementations§
Source§impl NativeWavEncodeSink
impl NativeWavEncodeSink
Sourcepub fn create(
path: impl Into<OutputTarget>,
sample_rate: u32,
channels: u16,
) -> Result<Self, EncodeError>
pub fn create( path: impl Into<OutputTarget>, sample_rate: u32, channels: u16, ) -> Result<Self, EncodeError>
Creates a non-overwriting sibling-partial WAV output of channels in the default layout.
§Errors
Returns an error for invalid PCM format, existing paths, or filesystem failures.
Sourcepub fn create_with_speakers(
path: impl Into<OutputTarget>,
sample_rate: u32,
speakers: SpeakerLayout,
) -> Result<Self, EncodeError>
pub fn create_with_speakers( path: impl Into<OutputTarget>, sample_rate: u32, speakers: SpeakerLayout, ) -> Result<Self, EncodeError>
Creates a WAV output whose blocks feed speakers.
The default layout for the count gets a plain header; any other is WAVE_FORMAT_EXTENSIBLE
with its channel mask and planes in the mask’s bit order.
§Errors
Returns an error for invalid PCM format, a layout a WAVE channel mask cannot express (unnamed, repeated, or beyond the 18 positions), existing paths, or filesystem failures.
Sourcepub fn publish_report(&self) -> Option<PublishReport>
pub fn publish_report(&self) -> Option<PublishReport>
How the finished file was published; None until it is.
Trait Implementations§
Source§impl AudioBlockSink for NativeWavEncodeSink
impl AudioBlockSink for NativeWavEncodeSink
Source§fn write_audio(
&mut self,
block: &AudioBlock,
cancel: &CancelToken,
) -> Result<(), EncodeError>
fn write_audio( &mut self, block: &AudioBlock, cancel: &CancelToken, ) -> Result<(), EncodeError>
Writes one monotonic audio block. Read more
Source§fn finish_audio(&mut self, cancel: &CancelToken) -> Result<(), EncodeError>
fn finish_audio(&mut self, cancel: &CancelToken) -> Result<(), EncodeError>
Drains and commits the sink. Read more
Source§fn abort_audio(&mut self) -> Result<(), EncodeError>
fn abort_audio(&mut self) -> Result<(), EncodeError>
Discards partial output. Read more
Source§impl Drop for NativeWavEncodeSink
impl Drop for NativeWavEncodeSink
Source§impl EncodeSink for NativeWavEncodeSink
impl EncodeSink for NativeWavEncodeSink
Source§fn write(
&mut self,
event: EncodeEvent,
cancel: &CancelToken,
) -> Result<(), EncodeError>
fn write( &mut self, event: EncodeEvent, cancel: &CancelToken, ) -> Result<(), EncodeError>
Queues one timestamped media item. Read more
Source§fn finish(&mut self, cancel: &CancelToken) -> Result<(), EncodeError>
fn finish(&mut self, cancel: &CancelToken) -> Result<(), EncodeError>
Drains encoder delay, interleaves remaining packets, and writes the trailer. Read more
Auto Trait Implementations§
impl Forget for NativeWavEncodeSink
impl Freeze for NativeWavEncodeSinkwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
I32NotAllOnes: Freeze,
PhantomData<usize>: Freeze,
impl Move for NativeWavEncodeSink
impl RefUnwindSafe for NativeWavEncodeSinkwhere
I32NotAllOnes: RefUnwindSafe,
impl Send for NativeWavEncodeSink
impl Sync for NativeWavEncodeSink
impl Unpin for NativeWavEncodeSink
impl UnsafeUnpin for NativeWavEncodeSinkwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
impl UnwindSafe for NativeWavEncodeSinkwhere
RawVecInner: UnwindSafe,
I32NotAllOnes: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more