pub struct WavStreamWriter<W> { /* private fields */ }Expand description
Writer streaming berbasis blok untuk menulis file RIFF WAV secara bertahap.
Implementations§
Source§impl WavStreamWriter<BufWriter<File>>
impl WavStreamWriter<BufWriter<File>>
Source§impl<W: Write + Seek> WavStreamWriter<W>
impl<W: Write + Seek> WavStreamWriter<W>
Sourcepub fn new(
writer: W,
num_channels: u16,
sample_rate: u32,
options: WavWriteOptions,
) -> Result<Self>
pub fn new( writer: W, num_channels: u16, sample_rate: u32, options: WavWriteOptions, ) -> Result<Self>
Inisialisasi streaming writer dan menulis placeholder header 44-byte.
pub fn frames_written(&self) -> usize
Sourcepub fn write_block(&mut self, block: &AudioBlock<'_>) -> Result<()>
pub fn write_block(&mut self, block: &AudioBlock<'_>) -> Result<()>
Menulis blok audio planar ke stream file.
Sourcepub fn write_block_frames(
&mut self,
block: &AudioBlock<'_>,
frame_count: usize,
) -> Result<()>
pub fn write_block_frames( &mut self, block: &AudioBlock<'_>, frame_count: usize, ) -> Result<()>
Menulis sejumlah frame_count dari AudioBlock ke stream file.
Sourcepub fn write_planar(&mut self, channels: &[&[f32]]) -> Result<()>
pub fn write_planar(&mut self, channels: &[&[f32]]) -> Result<()>
Menulis planar slices langsung.
Auto Trait Implementations§
impl<W> Freeze for WavStreamWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for WavStreamWriter<W>where
W: RefUnwindSafe,
impl<W> Send for WavStreamWriter<W>where
W: Send,
impl<W> Sync for WavStreamWriter<W>where
W: Sync,
impl<W> Unpin for WavStreamWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for WavStreamWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for WavStreamWriter<W>where
W: 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