From cb49e4446c3fd1d5ea7af624905d8f3da4de9356 Mon Sep 17 00:00:00 2001 From: Richard Mitic Date: Mon, 27 Jul 2020 14:18:41 +0200 Subject: [PATCH] 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). --- src/host/alsa/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/alsa/mod.rs b/src/host/alsa/mod.rs index 53b2e0c..f9344b8 100644 --- a/src/host/alsa/mod.rs +++ b/src/host/alsa/mod.rs @@ -903,7 +903,7 @@ fn set_hw_params_from_format<'a>( hw_params.set_channels(config.channels as u32)?; 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 => { // These values together represent a moderate latency and wakeup interval. // Without them we are at the mercy of the device