14const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
15const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
16const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
17const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
18const GUID KSINTERFACESETID_Standard = {0x1A8766A0L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
19const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
30#define AUDIO_TEST_RANGE (5)
91 ListHead = &MixerList->WaveInList;
93 ListHead = &MixerList->WaveOutList;
98 while(
Entry != ListHead)
102 if (
Index == DeviceIndex)
104 *OutWaveInfo = WaveInfo;
120 DataFormat->WaveFormatEx.wFormatTag = WaveFormatEx->wFormatTag;
121 DataFormat->WaveFormatEx.nChannels = WaveFormatEx->nChannels;
122 DataFormat->WaveFormatEx.nSamplesPerSec = WaveFormatEx->nSamplesPerSec;
123 DataFormat->WaveFormatEx.nBlockAlign = WaveFormatEx->nBlockAlign;
124 DataFormat->WaveFormatEx.nAvgBytesPerSec = WaveFormatEx->nAvgBytesPerSec;
125 DataFormat->WaveFormatEx.wBitsPerSample = WaveFormatEx->wBitsPerSample;
141 if (WaveFormatEx->nChannels == 0)
143 else if (WaveFormatEx->nChannels == 1)
145 else if (WaveFormatEx->nChannels == 2)
147 else if (WaveFormatEx->nChannels == 4)
149 else if (WaveFormatEx->nChannels == 5)
151 else if (WaveFormatEx->nChannels == 7)
170 PinProperty.
PinId = PinId;
197 *OutMultipleItem = MultipleItem;
222 *OutDataRangeAudio = DataRangeAudio;
255 cbSize = WaveFormatEx->wFormatTag ==
WAVE_FORMAT_PCM ? 0 : WaveFormatEx->cbSize;
310 if (DataRangeAudio->MinimumSampleFrequency <= SampleFrequency && DataRangeAudio->MaximumSampleFrequency >= SampleFrequency)
313 if (DataRangeAudio->MinimumBitsPerSample <= 8 && DataRangeAudio->MaximumBitsPerSample >= 8)
317 if (DataRangeAudio->MaximumChannels > 1)
324 if (DataRangeAudio->MinimumBitsPerSample <= 16 && DataRangeAudio->MaximumBitsPerSample >= 16)
329 if (DataRangeAudio->MaximumChannels > 1)
339 WaveInfo->u.InCaps.dwFormats =
Result;
341 WaveInfo->u.OutCaps.dwFormats =
Result;
368 DPRINT1(
"Implement support for multiple pins\n");
373 WaveInfo->
DeviceId = MixerData->DeviceId;
374 WaveInfo->
PinId = Pins[0];
441 MixerList->WaveInListCount++;
446 MixerList->WaveOutListCount++;
640 &AudioPosition,
sizeof(AudioPosition),
MIXER_CONTEXT MixerContext
#define KSPROPERTY_TYPE_SET
#define KSPROPERTY_TYPE_GET
#define InsertTailList(ListHead, Entry)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
@ KSPROPERTY_CONNECTION_STATE
#define IOCTL_KS_RESET_STATE
#define IOCTL_KS_PROPERTY
@ KSPROPERTY_PIN_DATARANGES
union KSDATAFORMAT * PKSDATARANGE
KSDDKAPI DWORD NTAPI KsCreatePin(HANDLE FilterHandle, PKSPIN_CONNECT Connect, ACCESS_MASK DesiredAccess, PHANDLE ConnectionHandle)
MIXER_STATUS(* PIN_CREATE_CALLBACK)(IN PVOID Context, IN ULONG DeviceId, IN ULONG PinId, IN HANDLE hFilter, IN PKSPIN_CONNECT PinConnect, IN ACCESS_MASK DesiredAccess, OUT PHANDLE PinHandle)
@ MM_STATUS_INVALID_PARAMETER
_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)
struct WAVE_INFO * LPWAVE_INFO
VOID MMixerInitializePinConnect(IN OUT PKSPIN_CONNECT PinConnect, IN ULONG PinId)
struct MIXER_LIST * PMIXER_LIST
MIXER_STATUS MMixerVerifyContext(IN PMIXER_CONTEXT MixerContext)
LPMIXER_DATA MMixerGetDataByDeviceId(IN PMIXER_LIST MixerList, IN ULONG DeviceId)
VOID MMixerInitializeDataFormat(_Inout_ PKSDATAFORMAT_WAVEFORMATEX DataFormat, _In_ LPWAVEFORMATEX WaveFormatEx, _In_ DWORD cbSize)
MIXER_STATUS MMixerSetWaveStatus(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN KSSTATE State)
PKSPIN_CONNECT MMixerAllocatePinConnect(IN PMIXER_CONTEXT MixerContext, ULONG DataFormatSize)
const GUID KSPROPSETID_Connection
VOID MMixerCheckFormat(IN PKSDATARANGE_AUDIO DataRangeAudio, IN LPWAVE_INFO WaveInfo, IN ULONG bInput)
MIXER_STATUS MMixerOpenWavePin(IN PMIXER_CONTEXT MixerContext, IN PMIXER_LIST MixerList, IN ULONG DeviceId, IN ULONG PinId, IN LPWAVEFORMATEX WaveFormatEx, IN ACCESS_MASK DesiredAccess, IN PIN_CREATE_CALLBACK CreateCallback, IN PVOID Context, OUT PHANDLE PinHandle)
const GUID KSINTERFACESETID_Standard
const GUID KSDATAFORMAT_TYPE_AUDIO
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
static AUDIO_RANGE TestRange[AUDIO_TEST_RANGE]
MIXER_STATUS MMixerFindAudioDataRange(PKSMULTIPLE_ITEM MultipleItem, PKSDATARANGE_AUDIO *OutDataRangeAudio)
MIXER_STATUS MMixerInitializeWaveInfo(IN PMIXER_CONTEXT MixerContext, IN PMIXER_LIST MixerList, IN LPMIXER_DATA MixerData, IN LPWSTR DeviceName, IN ULONG bWaveIn, IN ULONG PinCount, IN PULONG Pins)
ULONG MMixerGetWaveInCount(IN PMIXER_CONTEXT MixerContext)
MIXER_STATUS MMixerWaveOutCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEOUTCAPSW Caps)
MIXER_STATUS MMixerGetWaveDevicePath(IN PMIXER_CONTEXT MixerContext, IN ULONG bWaveIn, IN ULONG DeviceId, OUT LPWSTR *DevicePath)
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 MMixerGetAudioPinDataRanges(IN PMIXER_CONTEXT MixerContext, IN HANDLE hDevice, IN ULONG PinId, IN OUT PKSMULTIPLE_ITEM *OutMultipleItem)
MIXER_STATUS MMixerWaveInCapabilities(IN PMIXER_CONTEXT MixerContext, IN ULONG DeviceIndex, OUT LPWAVEINCAPSW Caps)
const GUID KSMEDIUMSETID_Standard
MIXER_STATUS MMixerSetWaveResetState(IN PMIXER_CONTEXT MixerContext, IN HANDLE PinHandle, IN ULONG bBegin)
ULONG MMixerGetWaveOutCount(IN PMIXER_CONTEXT MixerContext)
MIXER_STATUS MMixerGetWaveInfoByIndexAndType(IN PMIXER_LIST MixerList, IN ULONG DeviceIndex, IN ULONG bWaveInType, OUT LPWAVE_INFO *OutWaveInfo)
MIXER_STATUS MMixerGetWavePosition(_In_ PMIXER_CONTEXT MixerContext, _In_ HANDLE PinHandle, _Out_ PDWORD Position)
_In_ const GUID _In_ ULONG PinCount
base of all file and directory entries
ULONG MinimumBitsPerSample
ULONG MaximumBitsPerSample
ULONG MaximumSampleFrequency
ULONG MinimumSampleFrequency
PMIXER_DEVICE_CONTROL Control
union WAVEFORMATEXTENSIBLE::@3018 Samples
struct _LIST_ENTRY * Flink
WCHAR szPname[MAXPNAMELEN]
WCHAR szPname[MAXPNAMELEN]
#define CONTAINING_RECORD(address, type, field)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
#define IsEqualGUIDAligned(guid1, guid2)
#define WAVE_FORMAT_48S16
#define WAVE_FORMAT_48M16
#define WAVE_FORMAT_96S08
#define WAVE_FORMAT_96M16
#define WAVE_FORMAT_96S16
#define WAVE_FORMAT_48M08
#define WAVE_FORMAT_48S08
#define WAVE_FORMAT_96M08
_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