mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-06 03:50:06 +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
|
@ -52,8 +52,6 @@ fn open_device(dev_name: &str, format: AudioFormat) -> Result<(PCM, Frames), Box
|
|||
// For stereo samples encoded as 32-bit float, one frame has a length of eight bytes.
|
||||
let mut period_size = ((SAMPLES_PER_SECOND * format.size() as u32) as f32
|
||||
* (BUFFERED_LATENCY / BUFFERED_PERIODS as f32)) as Frames;
|
||||
|
||||
// Set hardware parameters: 44100 Hz / stereo / 32-bit float or 16-bit signed integer
|
||||
{
|
||||
let hwp = HwParams::any(&pcm)?;
|
||||
hwp.set_access(Access::RWInterleaved)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue