From b3eacf71132f076e5aec0080e945245cda79c465 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 13 Jan 2026 17:56:30 -0600 Subject: [PATCH] fix(rodio): avoid fixed ALSA buffer size --- src-tauri/vendor/rodio/src/stream.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src-tauri/vendor/rodio/src/stream.rs b/src-tauri/vendor/rodio/src/stream.rs index ba3dfa5c3..5c2632dbd 100644 --- a/src-tauri/vendor/rodio/src/stream.rs +++ b/src-tauri/vendor/rodio/src/stream.rs @@ -211,19 +211,6 @@ impl CpalDeviceExt for cpal::Device { let error_callback = |err| eprintln!("an error occurred on output stream: {}", err); let mut config = format.config(); - #[cfg(target_os = "linux")] - { - if let SupportedBufferSize::Range { min, max } = *format.buffer_size() { - // Aim for ~400ms buffer to reduce wakeups during music playback. - let target_frames = - (config.sample_rate.0 as u64).saturating_mul(2).saturating_div(5); - let clamped = target_frames - .clamp(min as u64, max as u64) - .min(u32::MAX as u64) as u32; - config.buffer_size = BufferSize::Fixed(clamped); - } - } - match format.sample_format() { cpal::SampleFormat::F32 => self.build_output_stream::( &config,