aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-09-24 16:06:15 -0700
committerChris Robinson <[email protected]>2023-09-24 16:06:15 -0700
commitacc618a1a68c99d61bf0c1897ba1af24e4ebed01 (patch)
treeda23978683a4fa2215fada5bf37b2dc6a847af7c
parent64746158a139b6389e656c8640e456dd623c4bd1 (diff)
Match the output sample rate if not requesting one
-rw-r--r--alc/backends/wasapi.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 4494317a..516ac02c 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -1710,6 +1710,10 @@ HRESULT WasapiPlayback::resetProxy()
OutputType.Samples.wValidBitsPerSample = OutputType.Format.wBitsPerSample;
OutputType.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+ /* Match the output rate if not requesting anything specific. */
+ if(!mDevice->Flags.test(FrequencyRequest))
+ mDevice->Frequency = OutputType.Format.nSamplesPerSec;
+
bool isRear51{false};
if(!mDevice->Flags.test(ChannelsRequest))
{