Re: [PATCH v2 0/5] MR8559: mmdevapi: Error out if the channel count or sampling rate doesn't match the mix format.
14 Jul
2025
14 Jul
'25
9:43 a.m.
Nikolay Sivov (@nsivov) commented about dlls/mmdevapi/client.c:
return E_INVALIDARG; }
+ if (mode == AUDCLNT_SHAREMODE_SHARED) { + WAVEFORMATEX *mix_fmt; + HRESULT hr; + + if (FAILED(hr = IAudioClient3_GetMixFormat(&client->IAudioClient3_iface, &mix_fmt))) + return hr; + + if (fmt->nChannels != mix_fmt->nChannels || fmt->nSamplesPerSec != mix_fmt->nSamplesPerSec) + return AUDCLNT_E_UNSUPPORTED_FORMAT; + + CoTaskMemFree(mix_fmt);
It should free on error path too. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8559#note_109739
156
Age (days ago)
156
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Sivov (@nsivov)