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:
parent
b94879de62
commit
a1326ba9f4
6 changed files with 25 additions and 51 deletions
|
@ -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(),
|
||||
)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue