From 6ae7fe05216950e461a27e05e8b9de53ccf8247b Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 5 Jan 2022 19:37:16 -0500 Subject: [PATCH] Use audio device's preferred sample rate by default in RtAudioDevice. --- src/rtaudio.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rtaudio.cpp b/src/rtaudio.cpp index 12098ec0..be4740c1 100644 --- a/src/rtaudio.cpp +++ b/src/rtaudio.cpp @@ -102,8 +102,7 @@ struct RtAudioDevice : audio::Device { options.numberOfBuffers = 2; options.streamName = "VCV Rack"; - // Most people prefer 44100 default sample rate although many devices report 48000 from `deviceInfo.preferredSampleRate`. - float closestSampleRate = 44100; + float closestSampleRate = deviceInfo.preferredSampleRate; if (sampleRate > 0) { // Find the closest sample rate to the requested one. for (float sr : deviceInfo.sampleRates) {