Skip to content

Commit

Permalink
Match the output sample rate if not requesting one
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Sep 24, 2023
1 parent 6474615 commit acc618a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alc/backends/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit acc618a

Please sign in to comment.