mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
audio: Split Deinitialize into two stages.
First stage happens before we destroy objects, and is generally used to shut down hotplug. The second stage is the usual deinit, which cleans up the lowlevel API, unloads shared libraries, etc.
This commit is contained in:
@@ -220,7 +220,7 @@ int WASAPI_PlatformInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WASAPI_PlatformDeinit(void)
|
||||
static void StopWasapiHotplug(void)
|
||||
{
|
||||
delete playback_device_event_handler;
|
||||
playback_device_event_handler = nullptr;
|
||||
@@ -228,6 +228,17 @@ void WASAPI_PlatformDeinit(void)
|
||||
capture_device_event_handler = nullptr;
|
||||
}
|
||||
|
||||
void WASAPI_PlatformDeinit(void)
|
||||
{
|
||||
StopWasapiHotplug();
|
||||
}
|
||||
|
||||
void WASAPI_PlatformDeinitializeStart(void)
|
||||
{
|
||||
StopWasapiHotplug();
|
||||
}
|
||||
|
||||
|
||||
void WASAPI_EnumerateEndpoints(SDL_AudioDevice **default_output, SDL_AudioDevice **default_capture)
|
||||
{
|
||||
Platform::String ^ defdevid;
|
||||
|
Reference in New Issue
Block a user