1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

First round of refactoring

- DRY-ups

 - Remove incorrect optimization attempt in the libvorbis decoder,
   that skewed 0.0 samples non-linear

 - PortAudio and SDL backends do not support S24 output. The PortAudio
   bindings could, but not through this API.
This commit is contained in:
Roderick van Domburg 2021-03-18 22:06:43 +01:00
parent b94879de62
commit a1326ba9f4
6 changed files with 25 additions and 51 deletions

View file

@ -45,13 +45,7 @@ where
packet
.data
.iter()
.map(|sample| {
if *sample == 0 {
0.0
} else {
((*sample as f64 + 0.5) / (0x7FFF as f64 + 0.5)) as f32
}
})
.map(|sample| ((*sample as f64 + 0.5) / (0x7FFF as f64 + 0.5)) as f32)
.collect(),
)));
}