Function mp3_duration::from_path
source · 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);