Skip to content

Commit

Permalink
[wasapi] Assume IAudioClient2 is always declared
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Dec 16, 2023
1 parent b7e6940 commit 766c7f3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions timidity/wasapi_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,6 @@ int open_output(void)
reset_temporary_encoding();
}
#endif
#ifdef __IAudioClient2_INTERFACE_DEFINED__
{
IAudioClient2 *pAudioClient2;
int ver = get_winver();
Expand All @@ -1035,15 +1034,15 @@ int open_output(void)

if (opt_wasapi_stream_option & 4) {
if (ver >= 6) // win10ˆÈã
acp.Options |= 4 /* AUDCLNT_STREAMOPTIONS_AMBISONICS */;
acp.Options |= AUDCLNT_STREAMOPTIONS_AMBISONICS;
}
if (opt_wasapi_stream_option & 2) {
if (ver >= 6) // win10ˆÈã
acp.Options |= 2 /* AUDCLNT_STREAMOPTIONS_MATCH_FORMAT */;
acp.Options |= AUDCLNT_STREAMOPTIONS_MATCH_FORMAT;
}
if (opt_wasapi_stream_option & 1){
if(ver >= 4) // win8.1ˆÈã
acp.Options |= 1 /* AUDCLNT_STREAMOPTIONS_RAW */;
acp.Options |= AUDCLNT_STREAMOPTIONS_RAW;
}

hr = IAudioClient2_SetClientProperties(pAudioClient2, (AudioClientProperties *)&acp);
Expand All @@ -1052,7 +1051,6 @@ int open_output(void)
goto error;
}
}
#endif
if(opt_wasapi_priority <= 0 || opt_wasapi_priority > 7)
ThreadPriorityNum = IsExclusive ? 6 : 1;
else
Expand Down

0 comments on commit 766c7f3

Please sign in to comment.