From 16932d0a6d6a8d0c2dbfb642b20e78cf6c5a55fc Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 16 Jul 2017 03:34:37 +0200 Subject: [PATCH] Set the correct sample rate in the returned audio format if an ALSA device chose a different rate than the one we asked for. --- alsa_input.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/alsa_input.cpp b/alsa_input.cpp index 3b59c00..b5fe3cb 100644 --- a/alsa_input.cpp +++ b/alsa_input.cpp @@ -101,6 +101,7 @@ bool ALSAInput::open_device() default: assert(false); } + audio_format.sample_rate = sample_rate; //printf("num_periods=%u period_size=%u buffer_frames=%u sample_rate=%u bits_per_sample=%d\n", // num_periods, unsigned(period_size), unsigned(buffer_frames), sample_rate, audio_format.bits_per_sample); -- 2.39.2