Speed up playback by avoiding unnecessary seek when playing from the beginning of a file.
@@ -580,10 +580,13 @@ impl PlayerInternal {
let mut decoder = VorbisDecoder::new(audio_file).unwrap();
+ if position != 0 {
+ info!("seek {}", position);
match decoder.seek(position) {
Ok(_) => (),
Err(err) => error!("Vorbis error: {:?}", err),
}
+ }
info!("Track \"{}\" loaded", track.name);
