Skip to main content

codewandler_audio/
lib.rs

1mod buffer;
2mod capture;
3mod channel;
4mod convert;
5mod ext;
6mod format;
7mod pipe;
8mod playback;
9mod source;
10
11pub use {
12    buffer::*, capture::*, channel::*, convert::*, format::*, pipe::*, playback::*,
13    source::*,
14};
15
16pub trait AudioSink: Send {
17    type Format: SampleFormat;
18
19    fn audio_write(&self, d: Self::Format) -> anyhow::Result<()>;
20}
21
22pub trait AudioSource: Sync + Send {
23    type Format: SampleFormat;
24
25    fn audio_read(&mut self) -> Option<Self::Format>;
26}