Skip to main content

DffFile

Struct DffFile 

Source
pub struct DffFile { /* private fields */ }

Implementations§

Source§

impl DffFile

Source

pub fn open(path: &Path) -> Result<DffFile, Error>

Attempt to open and parse the metadata of DFF file in read-only mode. Sample data is not read into memory to keep the memory footprint small.

§Errors

This function will return an error if path does not exist or is not a readable and valid DFF file.

Source

pub fn file(&self) -> &File

Return a reference to the underlying File.

Source

pub fn get_dsd_data_offset(&self) -> u64

Return the byte offset in the file where the DSD audio data starts.

Source

pub fn get_audio_length(&self) -> u64

Return the length of the DSD audio data in bytes.

Source

pub fn get_num_channels(&self) -> Result<usize, Error>

Return the number of audio channels.

Source

pub fn get_sample_rate(&self) -> Result<u32, Error>

Return the sample rate in Hz.

Source

pub fn get_form_chunk_size(&self) -> u64

Return the size of the FORM chunk in bytes

Source

pub fn get_file_size(&self) -> Result<u64, Error>

Return the total size of the DFF file in bytes

Source

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

Return a reference to the optional ID3v2 Tag.

Source

pub fn get_dff_version(&self) -> Result<u32, Error>

Return the DFF format version number.

Trait Implementations§

Source§

impl Debug for DffFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DffFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.