Cleanup repo from audio data

This commit is contained in:
Polochon_street 2023-12-28 13:58:26 +01:00
parent 1445939bf8
commit 479fbc7b89
13 changed files with 5 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Binary file not shown.

BIN
data/white_noise.mp3 Normal file

Binary file not shown.

View File

@ -274,7 +274,7 @@ mod tests {
let paths = vec![
"./data/s16_mono_22_5kHz.flac",
"./data/testcue.cue",
"./data/white_noise.flac",
"./data/white_noise.mp3",
"definitely-not-existing.foo",
"not-existing.foo",
];
@ -317,7 +317,7 @@ mod tests {
(true, PathBuf::from("./data/testcue.cue/CUE_TRACK001"), None),
(true, PathBuf::from("./data/testcue.cue/CUE_TRACK002"), None),
(true, PathBuf::from("./data/testcue.cue/CUE_TRACK003"), None),
(true, PathBuf::from("./data/white_noise.flac"), None),
(true, PathBuf::from("./data/white_noise.mp3"), None),
];
assert_eq!(results, expected_results);

View File

@ -303,13 +303,14 @@ mod tests {
assert!(0.0000001 > (expected - actual).abs());
}
let song = Song::decode(Path::new("data/white_noise.flac")).unwrap();
let song = Song::decode(Path::new("data/white_noise.mp3")).unwrap();
let mut spectral_desc = SpectralDesc::new(22050).unwrap();
for chunk in song.sample_array.chunks_exact(SpectralDesc::HOP_SIZE) {
spectral_desc.do_(&chunk).unwrap();
}
println!("{:?}", spectral_desc.get_flatness());
// White noise - as close to 1 as possible
let expected_values = vec![0.6706717, -0.9685736];
let expected_values = vec![0.5785303, -0.9426308];
for (expected, actual) in expected_values
.iter()
.zip(spectral_desc.get_flatness().iter())