From 486015a587a7781904fcf19a22a3a6529b17e35d Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 29 Sep 2021 09:21:21 -0400 Subject: [PATCH] Only cache RtAudio device info for DirectSound, WASAPI, and ASIO. --- src/rtaudio.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rtaudio.cpp b/src/rtaudio.cpp index c8281971..2b0d7ee2 100644 --- a/src/rtaudio.cpp +++ b/src/rtaudio.cpp @@ -247,8 +247,7 @@ struct RtAudioDriver : audio::Driver { rtAudio->showWarnings(false); // Cache DeviceInfos for performance and stability (especially for ASIO). - // Cache all audio drivers for now. - if (true) { + if (api == RtAudio::WINDOWS_WASAPI || api == RtAudio::WINDOWS_ASIO || api == RtAudio::WINDOWS_DS) { int count = rtAudio->getDeviceCount(); for (int deviceId = 0; deviceId < count; deviceId++) { RtAudio::DeviceInfo deviceInfo = rtAudio->getDeviceInfo(deviceId);