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);
DWORD WriteWaveBuffer(DWORD_PTR private_handle, PWAVEHDR wave_header, DWORD wave_header_size)
DWORD RestartDevice(DWORD private_handle)
MMRESULT GetDeviceData(HANDLE device_handle, DWORD ioctl, PBYTE output_buffer, DWORD buffer_size)
DWORD ResetDevice(DWORD private_handle)
VOID DestroySession(SessionInfo *session)
struct _ThreadInfo ThreadInfo
MMRESULT OpenKernelDevice(DeviceType device_type, UINT device_id, DWORD access, HANDLE *handle)
DWORD CloseDevice(DWORD_PTR private_handle)
struct _SessionInfo SessionInfo
DWORD BreakLoop(DWORD private_handle)
BOOL NotifyClient(SessionInfo *session_info, DWORD message, DWORD_PTR parameter1, DWORD_PTR parameter2)
DWORD GetDeviceCount(DeviceType device_type)
MMRESULT SetDeviceData(HANDLE device_handle, DWORD ioctl, PBYTE input_buffer, DWORD buffer_size)
VOID PerformWaveIO(SessionInfo *session_info)
struct _LoopInfo LoopInfo
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
MMRESULT CobbleDeviceName(DeviceType device_type, UINT device_id, PWCHAR out_device_name)
MMRESULT CreateSession(DeviceType device_type, UINT device_id, SessionInfo **session_info)
VOID CloseKernelDevice(HANDLE device_handle)
DWORD GetDeviceCapabilities(DeviceType device_type, UINT device_id, DWORD_PTR capabilities, DWORD capabilities_size)
struct _SessionInfo * next
DWORD QueryWaveFormat(DeviceType device_type, PVOID lpFormat)
SessionInfo * GetSession(DeviceType device_type, UINT device_id)
DWORD OpenDevice(DeviceType device_type, UINT device_id, PVOID open_descriptor, DWORD flags, DWORD_PTR private_handle)
HANDLE kernel_device_handle
DWORD WaveThread(LPVOID parameter)
GLuint GLint GLboolean GLint GLenum access
DWORD PauseDevice(DWORD private_handle)
MMRESULT ErrorToMmResult(UINT error_code)
MMRESULT CallSessionThread(SessionInfo *session_info, ThreadFunction function, PVOID thread_parameter)
DWORD HandleBySessionThread(DWORD_PTR private_handle, DWORD_PTR message, DWORD_PTR parameter)
DWORD GetPosition(DWORD private_handle, PMMTIME time, DWORD time_size)
MMRESULT StartSessionThread(SessionInfo *session_info)
CRITICAL_SECTION critical_section