pub trait DsdSource: Send {
// Required methods
fn info(&self) -> Result<DsdSourceInfo, DsdSourceError>;
fn reader(&self) -> Result<Box<dyn Read + Send>, DsdSourceError>;
}Expand description
A source of DSD audio data with a known native shape.
Implementers describe how their audio is laid out (see DsdSourceInfo)
and provide a reader that yields that data as raw
bytes, starting from the first byte of audio data. Implementers are not
responsible for converting between planar/interleaved layouts or bit
endianness; that is the responsibility of the reader consuming this trait.
Required Methods§
Sourcefn info(&self) -> Result<DsdSourceInfo, DsdSourceError>
fn info(&self) -> Result<DsdSourceInfo, DsdSourceError>
Describes the native shape of this source’s audio data. Fallible since some containers only discover certain properties (e.g. channel count, sample rate) while parsing, and may not have them available even after a successful open.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".