[Audio] Move SetTimerResolution() to InitiateAudio

Enforces a timer of 1.0ms without conflicting with other plugins that might reset it unknowingly
Fixes VI drop when changing settings in GLideN64
This commit is contained in:
oddMLan 2019-11-28 17:17:19 -07:00
parent 83ae43192f
commit d3f69997b1
1 changed files with 4 additions and 3 deletions

View File

@ -58,9 +58,7 @@ void PluginInit(void)
SetupTrace();
SetupAudioSettings();
StartTrace();
#ifdef _WIN32
SetTimerResolution();
#endif
//SetTimerResolution();
g_PluginInit = true;
}
@ -224,6 +222,9 @@ EXPORT int32_t CALL InitiateAudio(AUDIO_INFO Audio_Info)
g_SoundDriver->AI_Shutdown();
delete g_SoundDriver;
}
#ifdef _WIN32
SetTimerResolution();
#endif
g_AudioInfo = Audio_Info;
#ifdef _WIN32
g_SoundDriver = new DirectSoundDriver;