From: Steinar H. Gunderson Date: Sun, 16 Jul 2017 01:34:37 +0000 (+0200) Subject: Set the correct sample rate in the returned audio format if an ALSA device chose... X-Git-Tag: 1.6.2~1 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=16932d0a6d6a8d0c2dbfb642b20e78cf6c5a55fc Set the correct sample rate in the returned audio format if an ALSA device chose a different rate than the one we asked for. --- 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);