mirror of
https://github.com/RustAudio/rodio
synced 2024-12-05 01:39:15 +00:00
fix: formatting in src/
and tests/
This commit is contained in:
parent
9b2da72bd0
commit
c04934ee0d
2 changed files with 4 additions and 5 deletions
|
@ -90,9 +90,9 @@ where
|
||||||
self.samples_read += 1;
|
self.samples_read += 1;
|
||||||
i32_to_i16(value.unwrap_or(0))
|
i32_to_i16(value.unwrap_or(0))
|
||||||
}),
|
}),
|
||||||
(sample_format, bits_per_sample) => panic!(
|
(sample_format, bits_per_sample) => {
|
||||||
"Unimplemented wav spec: {sample_format:?}, {bits_per_sample}"
|
panic!("Unimplemented wav spec: {sample_format:?}, {bits_per_sample}")
|
||||||
),
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,7 @@ fn test_flac_encodings() {
|
||||||
|
|
||||||
// 24 bit FLAC file exported from Audacity (2 channels, various compression levels)
|
// 24 bit FLAC file exported from Audacity (2 channels, various compression levels)
|
||||||
for level in &[0, 5, 8] {
|
for level in &[0, 5, 8] {
|
||||||
let file =
|
let file = std::fs::File::open(format!("assets/audacity24bit_level{level}.flac")).unwrap();
|
||||||
std::fs::File::open(format!("assets/audacity24bit_level{level}.flac")).unwrap();
|
|
||||||
let mut decoder = rodio::Decoder::new(BufReader::new(file)).unwrap();
|
let mut decoder = rodio::Decoder::new(BufReader::new(file)).unwrap();
|
||||||
assert!(decoder.any(|x| x != 0));
|
assert!(decoder.any(|x| x != 0));
|
||||||
#[cfg(all(feature = "flac", not(feature = "symphonia-flac")))]
|
#[cfg(all(feature = "flac", not(feature = "symphonia-flac")))]
|
||||||
|
|
Loading…
Reference in a new issue