pub trait PcmSink<T: PcmSampleType>: PcmStream {
// Required methods
fn write(&mut self, pcm: PcmBuf<T, &[T]>) -> Result<usize, Self::Error> โ;
fn write_all(&mut self, pcm: PcmBuf<T, &[T]>) -> Result<(), Self::Error> โ;
// Provided method
fn write_all_drain(
&mut self,
pcm: PcmBuf<T, &[T]>,
) -> Result<(), Self::Error> โ
where Self: PcmDrain { ... }
}Available on crate feature
audio only.Expand description
๐ A stream that writes interleaved PCM frames.
๐ media/audio/pcm
A sink consumes audio. In practice, this is the trait used for playback, output, speakers, audio devices, files, or mixers that receive PCM frames.
Required Methodsยง
Provided Methodsยง
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementorsยง
impl<T: PcmSampleType> PcmSink<T> for AlsaPcmHandle
Available on crate feature
alsa only.