wasapi: Handle lost audio device endpoints.

This gracefully recovers when a device format is changed, and will switch
to the new default device if the current one is unplugged, etc.

This does not handle when a new default device is added; it only notices
if the current default goes away. That will be fixed by implementing the
stubbed-out MMNotificationClient_OnDefaultDeviceChanged() function.
This commit is contained in:
Ryan C. Gordon
2017-03-29 14:23:39 -04:00
parent f2179944cc
commit c85c57a05d
3 changed files with 204 additions and 61 deletions

View File

@@ -39,6 +39,7 @@ struct SDL_PrivateAudioData
HANDLE task;
SDL_bool coinitialized;
int framesize;
SDL_bool is_default_device;
};
#endif /* SDL_wasapi_h_ */