19#define WIN32_NO_STATUS
28#define MAX_DEVICES 256
29#define MAX_DEVICE_NAME_LENGTH 256
30#define MAX_BUFFER_SIZE 1048576
31#define MAX_WAVE_BYTES 1048576
34#define WHDR_COMPLETE 0x80000000
50#define IsWaveDevice(devicetype) \
51 ( ( devicetype == WaveOutDevice ) || ( devicetype == WaveInDevice ) )
53#define IsMidiDevice(devicetype) \
54 ( ( devicetype == MidiOutDevice ) || ( devicetype == MidiInDevice ) )
56#define IsAuxDevice(devicetype) \
57 ( devicetype == AuxDevice )
86#define DRVM_TERMINATE 0xFFFFFFFE
87#define DRVM_INVALID 0xFFFFFFFF
176#define ASSERT(condition) \
177 if ( ! (condition) ) \
178 DPRINT("ASSERT FAILED: %s\n", #condition);
256 PVOID thread_parameter);
275 DWORD capabilities_size);
281 PVOID open_descriptor,
291 DWORD private_handle);
295 DWORD private_handle);
299 DWORD private_handle);
303 DWORD private_handle,
319 DWORD wave_header_size);
GLuint GLint GLboolean GLint GLenum access
MMRESULT SetDeviceData(HANDLE device_handle, DWORD ioctl, PBYTE input_buffer, DWORD buffer_size)
MMRESULT CallSessionThread(SessionInfo *session_info, ThreadFunction function, PVOID thread_parameter)
MMRESULT GetDeviceData(HANDLE device_handle, DWORD ioctl, PBYTE output_buffer, DWORD buffer_size)
DWORD ResetDevice(DWORD private_handle)
SessionInfo * GetSession(DeviceType device_type, UINT device_id)
DWORD GetDeviceCapabilities(DeviceType device_type, UINT device_id, DWORD_PTR capabilities, DWORD capabilities_size)
MMRESULT CreateSession(DeviceType device_type, UINT device_id, SessionInfo **session_info)
VOID CloseKernelDevice(HANDLE device_handle)
VOID PerformWaveIO(SessionInfo *session_info)
MMRESULT ErrorToMmResult(UINT error_code)
MMRESULT StartSessionThread(SessionInfo *session_info)
DWORD HandleBySessionThread(DWORD_PTR private_handle, DWORD_PTR message, DWORD_PTR parameter)
DWORD CloseDevice(DWORD_PTR private_handle)
CRITICAL_SECTION critical_section
DWORD BreakLoop(DWORD private_handle)
struct _LoopInfo LoopInfo
struct _ThreadInfo ThreadInfo
MMRESULT CobbleDeviceName(DeviceType device_type, UINT device_id, PWCHAR out_device_name)
DWORD QueryWaveFormat(DeviceType device_type, PVOID lpFormat)
DWORD GetDeviceCount(DeviceType device_type)
struct _SessionInfo SessionInfo
DWORD WriteWaveBuffer(DWORD_PTR private_handle, PWAVEHDR wave_header, DWORD wave_header_size)
DWORD RestartDevice(DWORD private_handle)
DWORD PauseDevice(DWORD private_handle)
MMRESULT OpenKernelDevice(DeviceType device_type, UINT device_id, DWORD access, HANDLE *handle)
BOOL NotifyClient(SessionInfo *session_info, DWORD message, DWORD_PTR parameter1, DWORD_PTR parameter2)
DWORD OpenDevice(DeviceType device_type, UINT device_id, PVOID open_descriptor, DWORD flags, DWORD_PTR private_handle)
DWORD GetPosition(DWORD private_handle, PMMTIME time, DWORD time_size)
DWORD WaveThread(LPVOID parameter)
VOID DestroySession(SessionInfo *session)
HANDLE kernel_device_handle
struct _SessionInfo * next
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)