pub fn from_file(file: &File) -> Result<Duration, MP3DurationError>Expand description
Measures the duration of a file.
ยงExamples
use std::path::Path;
use std::fs::File;
use mp3_duration;
let path = Path::new("test/source.mp3");
let file = File::open(path).unwrap();
let duration = mp3_duration::from_file(&file).unwrap();
println!("File duration: {:?}", duration);