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