Skip to main content

DsdReader

Struct DsdReader 

Source
pub struct DsdReader { /* private fields */ }
Expand description

DSD input context for reading DSD audio data from various sources.

Implementations§

Source§

impl DsdReader

Source

pub fn dsd_rate(&self) -> i32

Source

pub fn channels_num(&self) -> usize

Source

pub fn std_in(&self) -> bool

Source

pub fn tag(&self) -> &Option<Tag>

Source

pub fn file_name(&self) -> &OsString

Source

pub fn audio_length(&self) -> u64

Source

pub fn block_size(&self) -> u32

Source

pub fn parent_path(&self) -> &Option<PathBuf>

Source

pub fn in_path(&self) -> &Option<PathBuf>

Source

pub fn new( in_path: Option<PathBuf>, format: FmtType, endianness: Endianness, dsd_rate: DsdRate, block_size: u32, channels: usize, ) -> Result<Self, Box<dyn Error>>

Construct DsdReader from stdin or a file path. Note that for container files, like DSF or DFF, you may prefer to use from_container(in_path) instead. If in_path is None, stdin is assumed. If in_path is a file containing raw DSD data, the other parameters are used to interpret the data. If in_path is a container file, the container metadata will override the other parameters.

§Arguments
  • in_path - Optional path to input file. If None, stdin is used.
  • format - DSD channel format (planar or interleaved)
  • endianness - DSD bit endianness (LSB-first or MSB-first)
  • dsd_rate - DSD rate multiplier
  • block_size - Block size of each read in bytes per channel
  • channels - Number of audio channels
Source

pub fn from_container(in_path: PathBuf) -> Result<Self, Box<dyn Error>>

Construct DsdReader from container file input (e.g. DSF, DFF)

Source

pub fn dsd_iter(&self) -> Result<DsdIter, Box<dyn Error>>

Construct and return instance of DSD sample iterator for reading DSD data frames.

Trait Implementations§

Source§

impl Default for DsdReader

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.