windows: Move IMMDevice work to common file, implement DirectSound enumeration support

This commit is contained in:
Ethan Lee
2022-07-10 12:59:33 -04:00
parent 2373da5d94
commit ae105ae1c7
12 changed files with 695 additions and 420 deletions

View File

@@ -55,16 +55,10 @@ struct SDL_PrivateAudioData
SDL_atomic_t just_activated;
};
/* these increment as default devices change. Opened default devices pick up changes in their threads. */
extern SDL_atomic_t WASAPI_DefaultPlaybackGeneration;
extern SDL_atomic_t WASAPI_DefaultCaptureGeneration;
/* win32 and winrt implementations call into these. */
int WASAPI_PrepDevice(_THIS, const SDL_bool updatestream);
void WASAPI_RefDevice(_THIS);
void WASAPI_UnrefDevice(_THIS);
void WASAPI_AddDevice(const SDL_bool iscapture, const char *devname, WAVEFORMATEXTENSIBLE *fmt, LPCWSTR devid);
void WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid);
/* These are functions that are implemented differently for Windows vs WinRT. */
int WASAPI_PlatformInit(void);