mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 20:28:28 +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:
parent
e55e556f32
commit
7a52f7b3fd
12 changed files with 85 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue