From 2bf29448052c1fe067f8a81681038b8a4d518782 Mon Sep 17 00:00:00 2001 From: Leandro Nini Date: Sun, 11 Feb 2024 16:30:53 +0100 Subject: [PATCH] ALSA: update sampling rate with the actual value got from driver --- src/audio/alsa/audiodrv.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/alsa/audiodrv.cpp b/src/audio/alsa/audiodrv.cpp index 3236078..b9f6c34 100644 --- a/src/audio/alsa/audiodrv.cpp +++ b/src/audio/alsa/audiodrv.cpp @@ -81,6 +81,7 @@ bool Audio_ALSA::open(AudioConfig &cfg) { // Gentoo bug #98769, comment 4 unsigned int rate = tmpCfg.frequency; checkResult(snd_pcm_hw_params_set_rate_near(_audioHandle, hw_params, &rate, 0)); + tmpCfg.frequency = rate; } _alsa_to_frames_divisor = tmpCfg.channels;