]> git.sesse.net Git - nageru/commitdiff
Set the correct sample rate in the returned audio format if an ALSA device chose...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Jul 2017 01:34:37 +0000 (03:34 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Jul 2017 01:34:45 +0000 (03:34 +0200)
alsa_input.cpp

index 3b59c00b6139ebe6737e0e2122fab66195b3760a..b5fe3cb904675a2596e4e87cf5dcd86387c62062 100644 (file)
@@ -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);