@@ -11353,13 +11353,6 @@ IMPLEMENTATION
11353
11353
#define CLSCTX_ALL 23
11354
11354
#endif
11355
11355
11356
- #ifndef MAXPNAMELEN
11357
- #define MAXPNAMELEN 32
11358
- #endif
11359
-
11360
- typedef UINT MA_MMRESULT;
11361
- typedef UINT MA_MMVERSION;
11362
-
11363
11356
/* IUnknown is used by both the WASAPI and DirectSound backends. It easier to just declare our version here. */
11364
11357
typedef struct ma_IUnknown ma_IUnknown;
11365
11358
#endif
@@ -20127,15 +20120,8 @@ static const IID MA_IID_DEVINTERFACE_AUDIO_CAPTURE = {0x2EEF81BE,
20127
20120
static const IID MA_IID_IActivateAudioInterfaceCompletionHandler = {0x41D949AB, 0x9862, 0x444A, {0x80, 0xF6, 0xC2, 0x61, 0x33, 0x4D, 0xA5, 0xEB}}; /* 41D949AB-9862-444A-80F6-C261334DA5EB */
20128
20121
#endif
20129
20122
20130
- static const IID MA_CLSID_MMDeviceEnumerator_Instance = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; /* BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator) */
20131
- static const IID MA_IID_IMMDeviceEnumerator_Instance = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; /* A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator) */
20132
- #ifdef __cplusplus
20133
- #define MA_CLSID_MMDeviceEnumerator MA_CLSID_MMDeviceEnumerator_Instance
20134
- #define MA_IID_IMMDeviceEnumerator MA_IID_IMMDeviceEnumerator_Instance
20135
- #else
20136
- #define MA_CLSID_MMDeviceEnumerator &MA_CLSID_MMDeviceEnumerator_Instance
20137
- #define MA_IID_IMMDeviceEnumerator &MA_IID_IMMDeviceEnumerator_Instance
20138
- #endif
20123
+ static const IID MA_CLSID_MMDeviceEnumerator = {0xBCDE0395, 0xE52F, 0x467C, {0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E}}; /* BCDE0395-E52F-467C-8E3D-C4579291692E = __uuidof(MMDeviceEnumerator) */
20124
+ static const IID MA_IID_IMMDeviceEnumerator = {0xA95664D2, 0x9614, 0x4F35, {0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6}}; /* A95664D2-9614-4F35-A746-DE8DB63617E6 = __uuidof(IMMDeviceEnumerator) */
20139
20125
20140
20126
#if defined(MA_WIN32_DESKTOP) || defined(MA_WIN32_GDK)
20141
20127
#define MA_MM_DEVICE_STATE_ACTIVE 1
@@ -21313,7 +21299,7 @@ static ma_result ma_context_create_IMMDeviceEnumerator__wasapi(ma_context* pCont
21313
21299
21314
21300
*ppDeviceEnumerator = NULL; /* Safety. */
21315
21301
21316
- hr = ma_CoCreateInstance(pContext, MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21302
+ hr = ma_CoCreateInstance(pContext, & MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, & MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21317
21303
if (FAILED(hr)) {
21318
21304
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator.");
21319
21305
return ma_result_from_HRESULT(hr);
@@ -21387,7 +21373,7 @@ static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device
21387
21373
MA_ASSERT(pContext != NULL);
21388
21374
MA_ASSERT(ppMMDevice != NULL);
21389
21375
21390
- hr = ma_CoCreateInstance(pContext, MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21376
+ hr = ma_CoCreateInstance(pContext, & MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, & MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21391
21377
if (FAILED(hr)) {
21392
21378
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create IMMDeviceEnumerator.\n");
21393
21379
return ma_result_from_HRESULT(hr);
@@ -21765,7 +21751,7 @@ static ma_result ma_context_enumerate_devices__wasapi(ma_context* pContext, ma_e
21765
21751
HRESULT hr;
21766
21752
ma_IMMDeviceEnumerator* pDeviceEnumerator;
21767
21753
21768
- hr = ma_CoCreateInstance(pContext, MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21754
+ hr = ma_CoCreateInstance(pContext, & MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, & MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
21769
21755
if (FAILED(hr)) {
21770
21756
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator.");
21771
21757
return ma_result_from_HRESULT(hr);
@@ -22694,7 +22680,7 @@ static ma_result ma_device_init__wasapi(ma_device* pDevice, const ma_device_conf
22694
22680
22695
22681
ma_mutex_init(&pDevice->wasapi.rerouteLock);
22696
22682
22697
- hr = ma_CoCreateInstance(pDevice->pContext, MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
22683
+ hr = ma_CoCreateInstance(pDevice->pContext, & MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, & MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
22698
22684
if (FAILED(hr)) {
22699
22685
ma_device_uninit__wasapi(pDevice);
22700
22686
ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[WASAPI] Failed to create device enumerator.");
@@ -25251,15 +25237,19 @@ is defined. We need to define the types and functions we need manually.
25251
25237
#define MA_WHDR_ENDLOOP 0x00000008
25252
25238
#define MA_WHDR_INQUEUE 0x00000010
25253
25239
25240
+ #define MA_MAXPNAMELEN 32
25241
+
25254
25242
typedef void* MA_HWAVEIN;
25255
25243
typedef void* MA_HWAVEOUT;
25244
+ typedef UINT MA_MMRESULT;
25245
+ typedef UINT MA_MMVERSION;
25256
25246
25257
25247
typedef struct
25258
25248
{
25259
25249
WORD wMid;
25260
25250
WORD wPid;
25261
25251
MA_MMVERSION vDriverVersion;
25262
- CHAR szPname[MAXPNAMELEN ];
25252
+ CHAR szPname[MA_MAXPNAMELEN ];
25263
25253
DWORD dwFormats;
25264
25254
WORD wChannels;
25265
25255
WORD wReserved1;
@@ -25270,7 +25260,7 @@ typedef struct
25270
25260
WORD wMid;
25271
25261
WORD wPid;
25272
25262
MA_MMVERSION vDriverVersion;
25273
- CHAR szPname[MAXPNAMELEN ];
25263
+ CHAR szPname[MA_MAXPNAMELEN ];
25274
25264
DWORD dwFormats;
25275
25265
WORD wChannels;
25276
25266
WORD wReserved1;
@@ -25294,7 +25284,7 @@ typedef struct
25294
25284
WORD wMid;
25295
25285
WORD wPid;
25296
25286
MA_MMVERSION vDriverVersion;
25297
- CHAR szPname[MAXPNAMELEN ];
25287
+ CHAR szPname[MA_MAXPNAMELEN ];
25298
25288
DWORD dwFormats;
25299
25289
WORD wChannels;
25300
25290
WORD wReserved1;
@@ -25309,7 +25299,7 @@ typedef struct
25309
25299
WORD wMid;
25310
25300
WORD wPid;
25311
25301
MA_MMVERSION vDriverVersion;
25312
- CHAR szPname[MAXPNAMELEN ];
25302
+ CHAR szPname[MA_MAXPNAMELEN ];
25313
25303
DWORD dwFormats;
25314
25304
WORD wChannels;
25315
25305
WORD wReserved1;
@@ -25384,7 +25374,7 @@ we can do things generically and typesafely. Names are being kept the same for c
25384
25374
*/
25385
25375
typedef struct
25386
25376
{
25387
- CHAR szPname[MAXPNAMELEN ];
25377
+ CHAR szPname[MA_MAXPNAMELEN ];
25388
25378
DWORD dwFormats;
25389
25379
WORD wChannels;
25390
25380
GUID NameGuid;
0 commit comments