XAudio2.h: make compatible with mingw

mingw doesn't ship this header, so to make it compatible we have
to create the uuid symbols, otherwise we get the following link
errors:

sndxa2.o:sndxa2.cpp:(.text+0x35f): undefined reference to `_GUID const& __mingw_uuidof<IXAudio2>()'
sndxa2.o:sndxa2.cpp:(.text+0x366): undefined reference to `_GUID const& __mingw_uuidof<XAudio2>()'
This commit is contained in:
rofl0r 2024-12-06 02:58:48 +00:00
parent 271490c3e1
commit 13bccf5738
1 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,13 @@ GARBONZOBEAN(XAudio2_Debug, 715bdd1a-aa82-436b-b0fa-6acea39bd0a1);
GARBONZOBEAN(IXAudio2, 8bcf1f58-9fe7-4583-8ac6-e2adc465c8bb);
#ifdef __MINGW32__
__CRT_UUID_DECL(XAudio2, 0x4c9b6dde,0x6809,0x46e6,0xa2,0x78,0x9b,0x6a,0x97,0x58,0x86,0x70);
__CRT_UUID_DECL(XAudio2_Debug, 0x715bdd1a,0xaa82,0x436b,0xb0,0xfa,0x6a,0xce,0xa3,0x9b,0xd0,0xa1);
__CRT_UUID_DECL(IXAudio2, 0x8bcf1f58,0x9fe7,0x4583,0x8a,0xc6,0xe2,0xad, 0xc4, 0x65, 0xc8, 0xbb);
#endif
// Ignore the rest of this header if only the GUID definitions were requested
#ifndef GUID_DEFS_ONLY