136 DevicePath[1] =
L'\\';
159 ULONG nOutBufferSize,
164 DWORD Transferred = 0;
170 if ( ! Overlapped.
hEvent )
236 InterfaceData.
cbSize =
sizeof(InterfaceData);
315 if (!
Data->EventHandle.Event)
370 DPRINT1(
"Failed to initialize mixer library with %x\n",
Status);
636 if (SoundDeviceInstance)
638 hMixer = SoundDeviceInstance->Handle;
684 Instance->WinMM.ClientCallbackInstanceData,
832 MixLineControls.
cbStruct =
sizeof(MixLineControls);
836 MixLineControls.
cbmxctrl =
sizeof(MixControl);
837 MixLineControls.
pamxctrl = &MixControl;
847 MixControlDetails.
cbStruct =
sizeof(MixControlDetails);
852 MixControlDetails.
paDetails = MixControlDetailsU;
860 *pdwVolume =
MAKELONG(
LOWORD(MixControlDetailsU[0].dwValue),
HIWORD(MixControlDetailsU[1].dwValue));
889 MixLineControls.
cbStruct =
sizeof(MixLineControls);
893 MixLineControls.
cbmxctrl =
sizeof(MixControl);
894 MixLineControls.
pamxctrl = &MixControl;
908 MixControlDetails.
cbStruct =
sizeof(MixControlDetails);
913 MixControlDetails.
paDetails = MixControlDetailsU;
978 lpHeader->PresentationTime.Numerator = 1;
979 lpHeader->PresentationTime.Denominator = 1;
982 Overlap->CompletionContext =
lpHeader;
1004 DPRINT1(
"NtDeviceIoControlFile() failed with status %08lx\n",
Status);
#define RegCloseKey(hKey)
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define NT_SUCCESS(StatCode)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
#define MXDM_GETCONTROLDETAILS
#define MXDM_GETLINECONTROLS
#define MXDM_SETCONTROLDETAILS
BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev, UINT wMsg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, CONST GUID *InterfaceClassGuid, DWORD MemberIndex, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO DeviceInfoSet, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, PSP_DEVICE_INTERFACE_DETAIL_DATA_W DeviceInterfaceDetailData, DWORD DeviceInterfaceDetailDataSize, PDWORD RequiredSize, PSP_DEVINFO_DATA DeviceInfoData)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(IN HDEVINFO DeviceInfoSet, IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, IN DWORD Reserved, IN REGSAM samDesired)
MMRESULT WdmAudGetLineControls(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINECONTROLSW MixControls, IN ULONG Flags)
MMRESULT WdmAudGetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
MMRESULT WdmAudGetVolumeByMMixer(_In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance, _In_ DWORD DeviceId, _Out_ PDWORD pdwVolume)
MMRESULT WdmAudSetMixerDeviceFormatByMMixer(IN PSOUND_DEVICE_INSTANCE Instance, IN DWORD DeviceId, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
VOID FreeEventData(IN PVOID EventData)
MMRESULT WdmAudGetDeviceInterfaceStringByMMixer(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
MMRESULT WdmAudGetCapabilitiesByMMixer(IN PSOUND_DEVICE SoundDevice, IN DWORD DeviceId, OUT PVOID Capabilities, IN DWORD CapabilitiesSize)
MMRESULT WdmAudQueryMixerInfoByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN DWORD MixerId, IN UINT uMsg, IN LPVOID Parameter, IN DWORD Flags)
MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
MMRESULT WdmAudGetLineInfo(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINEW MixLine, IN ULONG Flags)
MMRESULT WdmAudCloseSoundDeviceByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN PVOID Handle)
MMRESULT WdmAudGetWaveInCapabilities(IN ULONG DeviceId, LPWAVEINCAPSW Capabilities)
MMRESULT WdmAudSetVolumeByMMixer(_In_ PSOUND_DEVICE_INSTANCE SoundDeviceInstance, _In_ DWORD DeviceId, _In_ DWORD dwVolume)
MMRESULT WdmAudSetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
MMRESULT WdmAudGetWavePositionByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMTIME *Time)
MMRESULT WdmAudGetMixerCapabilities(IN ULONG DeviceId, LPMIXERCAPSW Capabilities)
MMRESULT WdmAudCommitWaveBufferByMMixer(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID OffsetPtr, IN DWORD Length, IN PSOUND_OVERLAPPED Overlap, IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine)
PVOID AllocEventData(IN ULONG ExtraSize)
MMRESULT WdmAudOpenSoundDeviceByMMixer(IN struct _SOUND_DEVICE *SoundDevice, OUT PVOID *Handle)
VOID CALLBACK MixerEventCallback(IN PVOID MixerEventContext, IN HANDLE hMixer, IN ULONG NotificationType, IN ULONG Value)
static VOID WINAPI CommitWaveBufferApc(PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved)
MIXER_STATUS OpenKey(IN HANDLE hKey, IN LPWSTR SubKey, IN ULONG DesiredAccess, OUT PHANDLE OutKey)
MMRESULT WdmAudGetWaveOutCapabilities(IN ULONG DeviceId, LPWAVEOUTCAPSW Capabilities)
PVOID Alloc(ULONG NumBytes)
MMRESULT WdmAudGetNumWdmDevsByMMixer(IN MMDEVICE_TYPE DeviceType, OUT DWORD *DeviceCount)
MMRESULT WdmAudCleanupByMMixer()
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
BOOL WdmAudInitUserModeMixer()
MIXER_STATUS CloseKey(IN HANDLE hKey)
BOOL MMixerLibraryInitialized
MMRESULT WdmAudSetWaveStateByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN BOOL bStart)
MIXER_CONTEXT MixerContext
MMRESULT WdmAudResetStreamByMMixer(IN struct _SOUND_DEVICE_INSTANCE *SoundDeviceInstance, IN MMDEVICE_TYPE DeviceType, IN BOOLEAN bStartReset)
MIXER_STATUS QueryKeyValue(IN HANDLE hKey, IN LPWSTR KeyName, OUT PVOID *ResultBuffer, OUT PULONG ResultLength, OUT PULONG KeyType)
MMRESULT WdmAudSetWaveDeviceFormatByMMixer(IN PSOUND_DEVICE_INSTANCE Instance, IN DWORD DeviceId, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize)
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
PKMT_RESULTBUFFER ResultBuffer
struct KSEVENTDATA * PKSEVENTDATA
#define KSEVENTF_EVENT_HANDLE
#define IOCTL_KS_READ_STREAM
#define IOCTL_KS_WRITE_STREAM
struct _SOUND_DEVICE_INSTANCE * PSOUND_DEVICE_INSTANCE
struct _SOUND_OVERLAPPED * PSOUND_OVERLAPPED
MMRESULT GetSoundDeviceFromInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, OUT PSOUND_DEVICE *SoundDevice)
MMRESULT TranslateInternalMmResult(IN MMRESULT Result)
MMRESULT GetSoundDeviceType(IN PSOUND_DEVICE SoundDevice, OUT PMMDEVICE_TYPE DeviceType)
#define MMSUCCESS(result)
#define SND_ASSERT(condition)
MIXER_STATUS MMixerSetWaveStatus(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN KSSTATE State)
ULONG MMixerGetWaveInCount(IN PMIXER_CONTEXT MixerContext)
MIXER_STATUS MMixerWaveOutCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEOUTCAPSW Caps)
MIXER_STATUS MMixerOpenWave(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, IN ULONG bWaveIn, IN LPWAVEFORMATEX WaveFormat, IN PIN_CREATE_CALLBACK CreateCallback, IN PVOID Context, OUT PHANDLE PinHandle)
MIXER_STATUS MMixerWaveInCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEINCAPSW Caps)
@ MM_STATUS_NO_MORE_DEVICES
MIXER_STATUS MMixerSetWaveResetState(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN ULONG bBegin)
ULONG MMixerGetWaveOutCount(IN PMIXER_CONTEXT MixerContext)
MIXER_STATUS MMixerGetWavePosition(_In_ PMIXER_CONTEXT MixerContext, _In_ HANDLE PinHandle, _Out_ PDWORD Position)
#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
#define MIXER_OBJECTF_MIXER
struct tagMIXERLINECONTROLSW * LPMIXERLINECONTROLSW
#define MMSYSERR_NOTSUPPORTED
#define MIXERCONTROL_CONTROLTYPE_VOLUME
#define MIXER_GETLINEINFOF_COMPONENTTYPE
struct tagMIXERLINEW * LPMIXERLINEW
struct tMIXERCONTROLDETAILS_UNSIGNED MIXERCONTROLDETAILS_UNSIGNED
struct tMIXERCONTROLDETAILS * LPMIXERCONTROLDETAILS
#define MIXER_GETLINECONTROLSF_ONEBYTYPE
#define MMSYSERR_BADDEVICEID
#define FILE_FLAG_OVERLAPPED
#define ERROR_FILE_NOT_FOUND
static OUT PIO_STATUS_BLOCK IoStatusBlock
static PLARGE_INTEGER Time
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID ApcContext
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
MIXER_STATUS MMixerSetMidiStatus(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN KSSTATE State)
MIXER_STATUS MMixerGetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
MIXER_STATUS MMixerOpen(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerId, IN PVOID MixerEventContext, IN PMIXER_EVENT MixerEventRoutine, OUT PHANDLE MixerHandle)
MIXER_STATUS MMixerGetLineControls(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINECONTROLSW MixerLineControls)
MIXER_STATUS MMixerSetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERCONTROLDETAILS MixerControlDetails)
MIXER_STATUS MMixerGetCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG MixerIndex, OUT LPMIXERCAPSW MixerCaps)
ULONG MMixerGetCount(IN PMIXER_CONTEXT MixerContext)
MIXER_STATUS MMixerGetLineInfo(IN PMIXER_CONTEXT MixerContext, IN HANDLE MixerHandle, IN ULONG MixerId, IN ULONG Flags, OUT LPMIXERLINEW MixerLine)
MIXER_STATUS MMixerInitialize(IN PMIXER_CONTEXT MixerContext, IN PMIXER_ENUM EnumFunction, IN PVOID EnumContext)
#define DIGCF_DEVICEINTERFACE
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA_W
#define SetupDiGetClassDevs
struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W * PSP_DEVICE_INTERFACE_DETAIL_DATA_W
LPOVERLAPPED_COMPLETION_ROUTINE OriginalCompletionRoutine
WCHAR DevicePath[ANYSIZE_ARRAY]
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
#define RtlMoveMemory(Destination, Source, Length)
struct _LARGE_INTEGER::@2304 u
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
_In_ WDF_WMI_PROVIDER_CONTROL Control
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
void(CALLBACK * LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD, DWORD, LPOVERLAPPED)
DWORD WINAPI GetLastError(void)
_In_ DWORD _In_ DWORD _In_ DWORD _Out_ LPDWORD lpBytesReturned
_Reserved_ PVOID Reserved
_In_ DWORD dwIoControlCode
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
_Inout_opt_ PVOID Parameter