Use alsa::pcm::Frames in alsa API calls instead of fixed-width integers.
`alsa::pcm::Frames` resolves to `c_long` which is 32 bits when compiling for raspberry pi (armv7l).
This commit is contained in:
parent
7a8f017b1d
commit
cb49e4446c
|
@ -903,7 +903,7 @@ fn set_hw_params_from_format<'a>(
|
||||||
hw_params.set_channels(config.channels as u32)?;
|
hw_params.set_channels(config.channels as u32)?;
|
||||||
|
|
||||||
match config.buffer_size {
|
match config.buffer_size {
|
||||||
BufferSize::Fixed(v) => hw_params.set_buffer_size(v as i64)?,
|
BufferSize::Fixed(v) => hw_params.set_buffer_size(v as alsa::pcm::Frames)?,
|
||||||
BufferSize::Default => {
|
BufferSize::Default => {
|
||||||
// These values together represent a moderate latency and wakeup interval.
|
// These values together represent a moderate latency and wakeup interval.
|
||||||
// Without them we are at the mercy of the device
|
// Without them we are at the mercy of the device
|
||||||
|
|
Loading…
Reference in New Issue