Path: blob/master/thirdparty/sdl/core/windows/SDL_immdevice.h
9905 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2025 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021#ifndef SDL_IMMDEVICE_H22#define SDL_IMMDEVICE_H2324#define COBJMACROS25#include <mmdeviceapi.h>26#include <mmreg.h>2728struct SDL_AudioDevice; // defined in src/audio/SDL_sysaudio.h2930typedef struct SDL_IMMDevice_callbacks31{32void (*audio_device_disconnected)(struct SDL_AudioDevice *device);33void (*default_audio_device_changed)(struct SDL_AudioDevice *new_default_device);34} SDL_IMMDevice_callbacks;3536bool SDL_IMMDevice_Init(const SDL_IMMDevice_callbacks *callbacks);37void SDL_IMMDevice_Quit(void);38bool SDL_IMMDevice_Get(struct SDL_AudioDevice *device, IMMDevice **immdevice, bool recording);39void SDL_IMMDevice_EnumerateEndpoints(struct SDL_AudioDevice **default_playback, struct SDL_AudioDevice **default_recording);40LPGUID SDL_IMMDevice_GetDirectSoundGUID(struct SDL_AudioDevice *device);41LPCWSTR SDL_IMMDevice_GetDevID(struct SDL_AudioDevice *device);42void SDL_IMMDevice_FreeDeviceHandle(struct SDL_AudioDevice *device);4344#endif // SDL_IMMDEVICE_H454647