| | |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #include "../../SDL_internal.h" |
| | | |
| | | /* This is code that Windows uses to talk to WASAPI-related system APIs. |
| | |
| | | #include "SDL_timer.h" |
| | | #include "../SDL_audio_c.h" |
| | | #include "../SDL_sysaudio.h" |
| | | #include "SDL_assert.h" |
| | | #include "SDL_log.h" |
| | | |
| | | #define COBJMACROS |
| | | #include <mmdeviceapi.h> |
| | |
| | | return SDL_SetError("WASAPI: CoInitialize() failed"); |
| | | } |
| | | |
| | | ret = CoCreateInstance(&SDL_CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_IMMDeviceEnumerator, (LPVOID) &enumerator); |
| | | ret = CoCreateInstance(&SDL_CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_IMMDeviceEnumerator, (LPVOID *) &enumerator); |
| | | if (FAILED(ret)) { |
| | | WIN_CoUninitialize(); |
| | | return WIN_SetErrorFromHRESULT("WASAPI CoCreateInstance(MMDeviceEnumerator)", ret); |