From e801155ddeab9345994da5f56b56746662275de7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 7 Jun 2015 02:32:39 +0200 Subject: [PATCH] Coreaudio: ignore [expected] SR changes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t disconnect from engine if sample-rate change happens during initialization. --- libs/backends/coreaudio/coreaudio_backend.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index 2ccc1fbcb7..09bab52469 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -1715,6 +1715,12 @@ CoreAudioBackend::buffer_size_callback () void CoreAudioBackend::sample_rate_callback () { + if (_preinit) { +#ifndef NDEBUG + printf("Samplerate change during initialization.\n"); +#endif + return; + } _pcmio->set_error_callback (NULL, NULL); _pcmio->set_sample_rate_callback (NULL, NULL); _pcmio->set_xrun_callback (NULL, NULL);