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§
- Data
Chunk - 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§
- Channel
Type - 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.