Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
BonnyAD9 committed Sep 12, 2023
1 parent 1f0ac2b commit f11db15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/player/sink_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{fs::File, time::Duration};

use raplay::{
sink::CallbackInfo,
source::{symph::SymphOptions, Symph, Source},
source::{symph::SymphOptions, Source, Symph},
Sink,
};

Expand Down Expand Up @@ -43,12 +43,12 @@ impl SinkWrapper {
let file = File::open(lib[id].path())?;
let src = Symph::try_new(file, &self.symph)?;


const SMALL_TIME: f64 = 0.1;

if let Some((_, total)) = src.get_time() {

if (lib[id].length().as_secs_f64() - total.as_secs_f64()).abs() > SMALL_TIME {
if (lib[id].length().as_secs_f64() - total.as_secs_f64()).abs()
> SMALL_TIME
{
lib[id].set_length(total);
}
}
Expand Down

0 comments on commit f11db15

Please sign in to comment.