mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 16:24:04 +02:00
WASAPI: Add support for disabling automatic stream routing.
This may be changed to a general config property later. Related to public issue #119
This commit is contained in:
+2
-1
@@ -2013,6 +2013,7 @@ typedef struct
|
||||
{
|
||||
ma_bool32 noAutoConvertSRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM. */
|
||||
ma_bool32 noDefaultQualitySRC; /* When set to true, disables the use of AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY. */
|
||||
ma_bool32 noAutoStreamRouting; /* Disables automatic stream routing. */
|
||||
} wasapi;
|
||||
struct
|
||||
{
|
||||
@@ -9111,7 +9112,7 @@ ma_result ma_device_init__wasapi(ma_context* pContext, const ma_device_config* p
|
||||
registering a IMMNotificationClient with it. We only care about this if it's the default device.
|
||||
*/
|
||||
#ifdef MA_WIN32_DESKTOP
|
||||
{
|
||||
if (pConfig->wasapi.noAutoStreamRouting == MA_FALSE) {
|
||||
ma_IMMDeviceEnumerator* pDeviceEnumerator;
|
||||
HRESULT hr = ma_CoCreateInstance(pContext, MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
|
||||
if (FAILED(hr)) {
|
||||
|
||||
Reference in New Issue
Block a user