mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 16:24:04 +02:00
Formatting.
This commit is contained in:
+6
-6
@@ -20158,10 +20158,10 @@ static ma_IMMNotificationClientVtbl g_maNotificationCientVtbl = {
|
|||||||
static LPCWSTR ma_to_usage_string__wasapi(ma_wasapi_usage usage)
|
static LPCWSTR ma_to_usage_string__wasapi(ma_wasapi_usage usage)
|
||||||
{
|
{
|
||||||
switch (usage) {
|
switch (usage) {
|
||||||
case ma_wasapi_usage_default: return NULL;
|
case ma_wasapi_usage_default: return NULL;
|
||||||
case ma_wasapi_usage_games: return L"Games";
|
case ma_wasapi_usage_games: return L"Games";
|
||||||
case ma_wasapi_usage_pro_audio: return L"Pro Audio";
|
case ma_wasapi_usage_pro_audio: return L"Pro Audio";
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -22419,12 +22419,12 @@ static ma_result ma_context_init__wasapi(ma_context* pContext, const ma_context_
|
|||||||
/* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */
|
/* Optionally use the Avrt API to specify the audio thread's latency sensitivity requirements */
|
||||||
pContext->wasapi.hAvrt = ma_dlopen(pContext, "avrt.dll");
|
pContext->wasapi.hAvrt = ma_dlopen(pContext, "avrt.dll");
|
||||||
if (pContext->wasapi.hAvrt) {
|
if (pContext->wasapi.hAvrt) {
|
||||||
pContext->wasapi.AvSetMmThreadCharacteristicsW = ma_dlsym(pContext, pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsW");
|
pContext->wasapi.AvSetMmThreadCharacteristicsW = ma_dlsym(pContext, pContext->wasapi.hAvrt, "AvSetMmThreadCharacteristicsW");
|
||||||
pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(pContext, pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics");
|
pContext->wasapi.AvRevertMmThreadcharacteristics = ma_dlsym(pContext, pContext->wasapi.hAvrt, "AvRevertMmThreadCharacteristics");
|
||||||
|
|
||||||
/* If either function could not be found, disable use of avrt entirely. */
|
/* If either function could not be found, disable use of avrt entirely. */
|
||||||
if (!pContext->wasapi.AvSetMmThreadCharacteristicsW || !pContext->wasapi.AvRevertMmThreadcharacteristics) {
|
if (!pContext->wasapi.AvSetMmThreadCharacteristicsW || !pContext->wasapi.AvRevertMmThreadcharacteristics) {
|
||||||
pContext->wasapi.AvSetMmThreadCharacteristicsW = NULL;
|
pContext->wasapi.AvSetMmThreadCharacteristicsW = NULL;
|
||||||
pContext->wasapi.AvRevertMmThreadcharacteristics = NULL;
|
pContext->wasapi.AvRevertMmThreadcharacteristics = NULL;
|
||||||
ma_dlclose(pContext, pContext->wasapi.hAvrt);
|
ma_dlclose(pContext, pContext->wasapi.hAvrt);
|
||||||
pContext->wasapi.hAvrt = NULL;
|
pContext->wasapi.hAvrt = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user