mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 08:14:04 +02:00
Add MAL_COINIT_VALUE.
This commit is contained in:
@@ -244,6 +244,9 @@
|
|||||||
//
|
//
|
||||||
// #define MAL_DEBUT_OUTPUT
|
// #define MAL_DEBUT_OUTPUT
|
||||||
// Enable printf() debug output.
|
// Enable printf() debug output.
|
||||||
|
//
|
||||||
|
// #ifndef MAL_COINIT_VALUE
|
||||||
|
// Windows only. The value to pass to internal calls to CoInitializeEx(). Defaults to COINIT_MULTITHREADED.
|
||||||
|
|
||||||
#ifndef mini_al_h
|
#ifndef mini_al_h
|
||||||
#define mini_al_h
|
#define mini_al_h
|
||||||
@@ -3007,6 +3010,11 @@ static MAL_INLINE mal_bool32 mal_is_big_endian()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef MAL_COINIT_VALUE
|
||||||
|
#define MAL_COINIT_VALUE 0 /* 0 = COINIT_MULTITHREADED*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef MAL_PI
|
#ifndef MAL_PI
|
||||||
#define MAL_PI 3.14159265358979323846264f
|
#define MAL_PI 3.14159265358979323846264f
|
||||||
@@ -19173,7 +19181,7 @@ mal_thread_result MAL_THREADCALL mal_worker_thread(void* pData)
|
|||||||
mal_assert(pDevice != NULL);
|
mal_assert(pDevice != NULL);
|
||||||
|
|
||||||
#ifdef MAL_WIN32
|
#ifdef MAL_WIN32
|
||||||
mal_CoInitializeEx(pDevice->pContext, NULL, 0); // 0 = COINIT_MULTITHREADED
|
mal_CoInitializeEx(pDevice->pContext, NULL, MAL_COINIT_VALUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
@@ -19353,7 +19361,7 @@ mal_result mal_context_init_backend_apis__win32(mal_context* pContext)
|
|||||||
pContext->win32.RegQueryValueExA = (mal_proc)mal_dlsym(pContext->win32.hAdvapi32DLL, "RegQueryValueExA");
|
pContext->win32.RegQueryValueExA = (mal_proc)mal_dlsym(pContext->win32.hAdvapi32DLL, "RegQueryValueExA");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mal_CoInitializeEx(pContext, NULL, 0); // 0 = COINIT_MULTITHREADED
|
mal_CoInitializeEx(pContext, NULL, MAL_COINIT_VALUE);
|
||||||
return MAL_SUCCESS;
|
return MAL_SUCCESS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -27385,6 +27393,7 @@ mal_uint64 mal_sine_wave_read(mal_sine_wave* pSineWave, mal_uint64 count, float*
|
|||||||
//
|
//
|
||||||
// v0.8.5-rc - 2018-xx-xx
|
// v0.8.5-rc - 2018-xx-xx
|
||||||
// - Fix a bug where an incorrect number of samples is returned from sinc resampling.
|
// - Fix a bug where an incorrect number of samples is returned from sinc resampling.
|
||||||
|
// - Add support for setting the value to be passed to internal calls to CoInitializeEx().
|
||||||
//
|
//
|
||||||
// v0.8.4 - 2018-08-06
|
// v0.8.4 - 2018-08-06
|
||||||
// - Add sndio backend for OpenBSD.
|
// - Add sndio backend for OpenBSD.
|
||||||
|
|||||||
Reference in New Issue
Block a user