Skip to content

Commit

Permalink
Silence a clippy warning?
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Sep 24, 2024
1 parent 9c2c80e commit 231f6e3
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions playback/src/audio_backend/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,13 @@ impl SinkAsBytes for StdoutSink {
.map_err(StdoutError::OnWrite)?;

#[cfg(feature = "spotty")]
match self.file.clone().as_deref() {
Some(NULLDEVICE) => {
// can we sleep for the duration of the "data" packets?
let ms: u64 = ((data.len() * 8 * 1000) / (1411 * 1024))
.try_into()
.unwrap();
eprintln!("NullSink::write_bytes: {:?} - {:?}", data.len(), ms);
thread::sleep(Duration::from_millis(ms));
}
_ => {}
if let Some(NULLDEVICE) = self.file.clone().as_deref() {
// can we sleep for the duration of the "data" packets?
let ms: u64 = ((data.len() * 8 * 1000) / (1411 * 1024))
.try_into()
.unwrap();
// eprintln!("NullSink::write_bytes: {:?} - {:?}", data.len(), ms);
thread::sleep(Duration::from_millis(ms));
}

Ok(())
Expand Down

0 comments on commit 231f6e3

Please sign in to comment.