From bdd67761885387630b91c4a10b81f527511e903e Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 13 Jan 2026 01:17:07 -0600 Subject: [PATCH] perf(alsa): increase buffer/period to reduce wakeups --- src-tauri/vendor/cpal/src/host/alsa/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/vendor/cpal/src/host/alsa/mod.rs b/src-tauri/vendor/cpal/src/host/alsa/mod.rs index 0bf8b81fd..592f66a75 100644 --- a/src-tauri/vendor/cpal/src/host/alsa/mod.rs +++ b/src-tauri/vendor/cpal/src/host/alsa/mod.rs @@ -1067,9 +1067,9 @@ fn set_hw_params_from_format( // Without them, we are at the mercy of the device. // // QBZ note: prefer fewer wakeups during playback to reduce CPU usage. - // 50ms period / 200ms buffer is still reasonable for music playback. - hw_params.set_period_time_near(50_000, alsa::ValueOr::Nearest)?; - hw_params.set_buffer_time_near(200_000, alsa::ValueOr::Nearest)?; + // 100ms period / 400ms buffer is still reasonable for music playback. + hw_params.set_period_time_near(100_000, alsa::ValueOr::Nearest)?; + hw_params.set_buffer_time_near(400_000, alsa::ValueOr::Nearest)?; } }