Function mp3_duration::from_file
[−]
[src]
pub fn from_file(file: &File) -> Result<Duration, Error>
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);