Skip to main content

Crate dsf_meta

Crate dsf_meta 

Source
Expand description

DSF file utilities.

A DSF (DSD Stream File) is a high-resolution audio file which contains uncompressed DSD audio data along with information about how the audio data is encoded. It can also optionally include an ID3v2 tag which contains metadata about the music e.g. artist, album, etc.

§Examples

This example displays the metadata for the DSF file my/music.dsf.

 use dsf_meta::DsfFile;
 use std::path::Path;

 let path = Path::new("my/music.dsf");

 match DsfFile::open(path) {
     Ok(dsf_file) => {
         eprintln!("DSF file metadata:\n\n{}", dsf_file);
     }
     Err(error) => {
         eprintln!("Error: {}", error);
     }
 }

Recovering from ID3 errors example:

 use dsf_meta::DsfFile;
 use std::path::Path;
 
 let path = Path::new("my/music.dsf");
 
 let dsf_file = DsfFile::open(path).unwrap();
 
 if let Some(e) = dsf_file.tag_read_err() {
     eprintln!("[Warning] Full read of ID3 tag failed. Partial read attempted: {}", e);
 }

Structs§

DataChunk
The data chunk contains the DSD sample data.
DsdChunk
The DSD chunk is the first chunk of a DSF file.
DsfFile
In memory representation of a DSF file.
FmtChunk
The fmt chunk contains information about the audio format.

Enums§

ChannelType
The different channel formats possible for a DSF file.
Error
Errors provided by the dsf crate.

Constants§

DSF_SAMPLE_DATA_OFFSET
The offset in bytes of the sample data within a DSF file.