From 529cc38c671b6366d38b4e50a7d5f8a3a4b6e25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 1 May 2024 23:24:57 +0200 Subject: [PATCH] ao_wasapi_changenotify: fix IsEqualPropertyKey for C --- audio/out/ao_wasapi_changenotify.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audio/out/ao_wasapi_changenotify.c b/audio/out/ao_wasapi_changenotify.c index f0e1895305..7f1c16794f 100644 --- a/audio/out/ao_wasapi_changenotify.c +++ b/audio/out/ao_wasapi_changenotify.c @@ -155,6 +155,11 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDefaultDeviceChanged( return S_OK; } +// IsEqualIID in Windows SDK passes GUID as REFGUID (reference) in C++, but in +// C is has to get pointers... +#undef IsEqualPropertyKey +#define IsEqualPropertyKey(a, b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid, &(b).fmtid)) + static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnPropertyValueChanged( IMMNotificationClient *This, LPCWSTR pwstrDeviceId,