ReactOS 0.4.16-dev-329-g9223134
sup.c File Reference
#include "precomp.h"
#include <debug.h>
Include dependency graph for sup.c:

Go to the source code of this file.

Functions

MIXER_STATUS MMixerVerifyContext (IN PMIXER_CONTEXT MixerContext)
 
LPMIXERLINE_EXT MMixerGetMixerLineContainingNodeId (IN LPMIXER_INFO MixerInfo, IN ULONG NodeID)
 
VOID MMixerGetLowestLogicalTopologyPinOffsetFromArray (IN ULONG LogicalPinArrayCount, IN PULONG LogicalPinArray, OUT PULONG PinOffset)
 
VOID MMixerFreeMixerInfo (IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo)
 
LPMIXER_DATA MMixerGetMixerDataByDeviceHandle (IN PMIXER_CONTEXT MixerContext, IN HANDLE hDevice)
 
LPMIXER_INFO MMixerGetMixerInfoByIndex (IN PMIXER_CONTEXT MixerContext, IN ULONG MixerIndex)
 
MIXER_STATUS MMixerGetMixerByName (IN PMIXER_LIST MixerList, IN LPWSTR MixerName, OUT LPMIXER_INFO *OutMixerInfo)
 
LPMIXERLINE_EXT MMixerGetSourceMixerLineByLineId (LPMIXER_INFO MixerInfo, DWORD dwLineID)
 
LPGUID MMixerGetNodeType (IN PKSMULTIPLE_ITEM MultipleItem, IN ULONG Index)
 
LPMIXERLINE_EXT MMixerGetSourceMixerLineByComponentType (LPMIXER_INFO MixerInfo, DWORD dwComponentType)
 
MIXER_STATUS MMixerGetMixerControlById (LPMIXER_INFO MixerInfo, DWORD dwControlID, LPMIXERLINE_EXT *OutMixerLine, LPMIXERCONTROL_EXT *OutMixerControl, PULONG NodeId)
 
ULONG MMixerGetVolumeControlIndex (LPMIXERVOLUME_DATA VolumeData, LONG Value)
 
VOID MMixerNotifyControlChange (IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo, IN ULONG NotificationType, IN ULONG Value)
 
MIXER_STATUS MMixerSetGetMuteControlDetails (IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo, IN LPMIXERCONTROL_EXT MixerControl, IN ULONG dwLineID, IN LPMIXERCONTROLDETAILS MixerControlDetails, IN ULONG bSet)
 
MIXER_STATUS MMixerSetGetMuxControlDetails (IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo, IN ULONG NodeId, IN ULONG bSet, IN ULONG Flags, IN LPMIXERCONTROL_EXT MixerControl, IN LPMIXERCONTROLDETAILS MixerControlDetails, IN LPMIXERLINE_EXT MixerLine)
 
MIXER_STATUS MMixerSetGetVolumeControlDetails (IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo, IN ULONG NodeId, IN ULONG bSet, LPMIXERCONTROL_EXT MixerControl, IN LPMIXERCONTROLDETAILS MixerControlDetails, LPMIXERLINE_EXT MixerLine)
 
LPMIXER_DATA MMixerGetDataByDeviceId (IN PMIXER_LIST MixerList, IN ULONG DeviceId)
 
LPMIXER_DATA MMixerGetDataByDeviceName (IN PMIXER_LIST MixerList, IN LPWSTR DeviceName)
 
MIXER_STATUS MMixerCreateMixerData (IN PMIXER_CONTEXT MixerContext, IN PMIXER_LIST MixerList, IN ULONG DeviceId, IN LPWSTR DeviceName, IN HANDLE hDevice, IN HANDLE hKey)
 
MIXER_STATUS MMixerGetDeviceNameWithComponentId (IN PMIXER_CONTEXT MixerContext, IN HANDLE hMixer, OUT LPWSTR OutDeviceName)
 
MIXER_STATUS MMixerGetDeviceName (IN PMIXER_CONTEXT MixerContext, OUT LPWSTR DeviceName, IN HANDLE hKey)
 
VOID MMixerInitializePinConnect (IN OUT PKSPIN_CONNECT PinConnect, IN ULONG PinId)
 

Variables

const GUID KSNODETYPE_SUM = {0xDA441A60L, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_DAC = {0x507AE360L, 0xC554, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_ADC = {0x4D837FE0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_AGC = {0xE88C9BA0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_LOUDNESS = {0x41887440L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_MUTE = {0x02B223C0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_TONE = {0x7607E580L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_VOLUME = {0x3A5ACC00L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_PEAKMETER = {0xa085651e, 0x5f0d, 0x4b36, {0xa8, 0x69, 0xd1, 0x95, 0xd6, 0xab, 0x4b, 0x9e}}
 
const GUID KSNODETYPE_MUX = {0x2CEAF780, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_STEREO_WIDE = {0xA9E69800L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_CHORUS = {0x20173F20L, 0xC559, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_REVERB = {0xEF0328E0L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSNODETYPE_SUPERMIX = {0xE573ADC0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}
 
const GUID KSPROPSETID_Audio = {0x45FFAAA0L, 0x6E1B, 0x11D0, {0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}
 
const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}}
 
const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}
 
const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSEVENTSETID_AudioControlChange = {0xE85E9698L, 0xFA2F, 0x11D1, {0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}}
 
const GUID KSDATAFORMAT_TYPE_MUSIC = {0xE725D360L, 0x62CC, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSDATAFORMAT_SUBTYPE_MIDI = {0x1D262760L, 0xE957, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}
 
const GUID KSDATAFORMAT_SPECIFIER_NONE = {0x0F6417D6L, 0xC318, 0x11D0, {0xA4, 0x3F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}
 

Function Documentation

◆ MMixerCreateMixerData()

MIXER_STATUS MMixerCreateMixerData ( IN PMIXER_CONTEXT  MixerContext,
IN PMIXER_LIST  MixerList,
IN ULONG  DeviceId,
IN LPWSTR  DeviceName,
IN HANDLE  hDevice,
IN HANDLE  hKey 
)

Definition at line 778 of file sup.c.

785{
786 LPMIXER_DATA MixerData;
787
788 MixerData = (LPMIXER_DATA)MixerContext->Alloc(sizeof(MIXER_DATA));
789 if (!MixerData)
790 return MM_STATUS_NO_MEMORY;
791
792 MixerData->DeviceId = DeviceId;
793 MixerData->DeviceName = DeviceName;
794 MixerData->hDevice = hDevice;
795 MixerData->hDeviceInterfaceKey = hKey;
796 MixerData->Topology = NULL;
797
798 InsertTailList(&MixerList->MixerData, &MixerData->Entry);
799 MixerList->MixerDataCount++;
800 return MM_STATUS_SUCCESS;
801}
#define NULL
Definition: types.h:112
MIXER_CONTEXT MixerContext
Definition: mmixer.c:41
#define InsertTailList(ListHead, Entry)
FxAutoRegKey hKey
@ MM_STATUS_NO_MEMORY
Definition: mmixer.h:12
@ MM_STATUS_SUCCESS
Definition: mmixer.h:5
struct MIXER_DATA * LPMIXER_DATA
PMIXER_ALLOC Alloc
Definition: mmixer.h:94
LIST_ENTRY Entry
Definition: precomp.h:113
HANDLE hDevice
Definition: precomp.h:115
HANDLE hDeviceInterfaceKey
Definition: precomp.h:116
LPWSTR DeviceName
Definition: precomp.h:117
ULONG DeviceId
Definition: precomp.h:114
PTOPOLOGY Topology
Definition: precomp.h:118
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275

Referenced by MMixerInitialize().

◆ MMixerFreeMixerInfo()

VOID MMixerFreeMixerInfo ( IN PMIXER_CONTEXT  MixerContext,
IN LPMIXER_INFO  MixerInfo 
)

Definition at line 115 of file sup.c.

118{
119 /* UNIMPLEMENTED;
120 * FIXME
121 * free all lines
122 */
123
124 MixerContext->Free((PVOID)MixerInfo);
125}
PMIXER_FREE Free
Definition: mmixer.h:96

◆ MMixerGetDataByDeviceId()

LPMIXER_DATA MMixerGetDataByDeviceId ( IN PMIXER_LIST  MixerList,
IN ULONG  DeviceId 
)

Definition at line 735 of file sup.c.

738{
740 LPMIXER_DATA MixerData;
741
742 Entry = MixerList->MixerData.Flink;
743 while(Entry != &MixerList->MixerData)
744 {
746 if (MixerData->DeviceId == DeviceId)
747 {
748 return MixerData;
749 }
750 Entry = Entry->Flink;
751 }
752 return NULL;
753}
base of all file and directory entries
Definition: entries.h:83
Definition: typedefs.h:120
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by MMixerGetMidiDevicePath(), MMixerGetWaveDevicePath(), MMixerOpenMidiPin(), and MMixerOpenWavePin().

◆ MMixerGetDataByDeviceName()

LPMIXER_DATA MMixerGetDataByDeviceName ( IN PMIXER_LIST  MixerList,
IN LPWSTR  DeviceName 
)

Definition at line 756 of file sup.c.

759{
761 LPMIXER_DATA MixerData;
762
763 Entry = MixerList->MixerData.Flink;
764 while(Entry != &MixerList->MixerData)
765 {
767 if (_wcsicmp(&DeviceName[2], &MixerData->DeviceName[2]) == 0)
768 {
769 /* found entry */
770 return MixerData;
771 }
772 Entry = Entry->Flink;
773 }
774 return NULL;
775}
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

Referenced by MMixerHandlePhysicalConnection().

◆ MMixerGetDeviceName()

MIXER_STATUS MMixerGetDeviceName ( IN PMIXER_CONTEXT  MixerContext,
OUT LPWSTR  DeviceName,
IN HANDLE  hKey 
)

Definition at line 852 of file sup.c.

856{
857 LPWSTR Name;
858 HANDLE hTemp;
860 ULONG Type;
862
863 Status = MixerContext->QueryKeyValue(hKey, L"FriendlyName", (PVOID*)&Name, &Length, &Type);
865 {
866 /* copy device name */
868
869 /* make sure its null terminated */
870 DeviceName[MAXPNAMELEN-1] = L'\0';
871
872 /* free device name */
874
875 /* done */
876 return Status;
877 }
878
879 Status = MixerContext->OpenKey(hKey, L"Device Parameters", KEY_READ, &hTemp);
881 return Status;
882
883 Status = MixerContext->QueryKeyValue(hTemp, L"FriendlyName", (PVOID*)&Name, &Length, &Type);
885 {
886 /* copy device name */
888
889 /* make sure its null terminated */
890 DeviceName[MAXPNAMELEN-1] = L'\0';
891
892 /* free device name */
894 }
895
896 MixerContext->CloseKey(hTemp);
897 return Status;
898}
Type
Definition: Type.h:7
struct NameRec_ * Name
Definition: cdprocs.h:460
Status
Definition: gdiplustypes.h:25
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
MIXER_STATUS
Definition: mmixer.h:4
#define MAXPNAMELEN
Definition: mmsystem.h:24
#define min(a, b)
Definition: monoChain.cc:55
#define KEY_READ
Definition: nt_native.h:1023
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
PMIXER_OPEN_KEY OpenKey
Definition: mmixer.h:100
PMIXER_CLOSEKEY CloseKey
Definition: mmixer.h:102
PMIXER_COPY Copy
Definition: mmixer.h:99
PMIXER_QUERY_KEY_VALUE QueryKeyValue
Definition: mmixer.h:101
uint32_t ULONG
Definition: typedefs.h:59
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by MMixerInitializeFilter(), and MMixerInitializeMidiForFilter().

◆ MMixerGetDeviceNameWithComponentId()

MIXER_STATUS MMixerGetDeviceNameWithComponentId ( IN PMIXER_CONTEXT  MixerContext,
IN HANDLE  hMixer,
OUT LPWSTR  OutDeviceName 
)

Definition at line 804 of file sup.c.

808{
814 ULONG ResultLength, KeyType;
815 HANDLE hMediaKey, hGuidKey;
817
818 /* prepare property */
822
823 /* try get component id */
825
827 {
828 Status = MixerContext->OpenKey(NULL, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\MediaCategories", KEY_READ, &hMediaKey);
830 {
832 Status = MixerContext->OpenKey(hMediaKey, GuidString.Buffer, KEY_READ, &hGuidKey);
835 {
836 Status = MixerContext->QueryKeyValue(hGuidKey, L"Name", (PVOID*)&DeviceName, &ResultLength, &KeyType);
838 {
839 MixerContext->Copy(OutDeviceName, DeviceName, min(ResultLength, (MAXPNAMELEN-1)*2));
841 }
842
843 MixerContext->CloseKey(hGuidKey);
844 }
845 MixerContext->CloseKey(hMediaKey);
846 }
847 }
848 return Status;
849}
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1281
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
#define IOCTL_KS_PROPERTY
Definition: ks.h:127
@ KSPROPERTY_GENERAL_COMPONENTID
Definition: ks.h:447
static PWSTR GuidString
Definition: apphelp.c:93
HMIXER hMixer
Definition: test.c:10
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
const GUID KSPROPSETID_General
Definition: sup.c:31
PMIXER_DEVICE_CONTROL Control
Definition: mmixer.h:95
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776

Referenced by MMixerInitializeFilter().

◆ MMixerGetLowestLogicalTopologyPinOffsetFromArray()

VOID MMixerGetLowestLogicalTopologyPinOffsetFromArray ( IN ULONG  LogicalPinArrayCount,
IN PULONG  LogicalPinArray,
OUT PULONG  PinOffset 
)

Definition at line 90 of file sup.c.

94{
96 ULONG LowestId = 0;
97
98 for(Index = 1; Index < LogicalPinArrayCount; Index++)
99 {
100 if (LogicalPinArray[Index] != MAXULONG)
101 {
102 /* sanity check: logical pin id must be unique */
103 ASSERT(LogicalPinArray[Index] != LogicalPinArray[LowestId]);
104 }
105
106 if (LogicalPinArray[Index] < LogicalPinArray[LowestId])
107 LowestId = Index;
108 }
109
110 /* store result */
111 *PinOffset = LowestId;
112}
#define ASSERT(a)
Definition: mode.c:44
#define MAXULONG
Definition: typedefs.h:251
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by MMixerSetGetMuxControlDetails().

◆ MMixerGetMixerByName()

MIXER_STATUS MMixerGetMixerByName ( IN PMIXER_LIST  MixerList,
IN LPWSTR  MixerName,
OUT LPMIXER_INFO OutMixerInfo 
)

Definition at line 191 of file sup.c.

195{
196 LPMIXER_INFO MixerInfo;
198
199 Entry = MixerList->MixerList.Flink;
200 while(Entry != &MixerList->MixerList)
201 {
203
204 DPRINT1("MixerName %S MixerName %S\n", MixerInfo->MixCaps.szPname, MixerName);
205 if (_wcsicmp(MixerInfo->MixCaps.szPname, MixerName) == 0)
206 {
207 *OutMixerInfo = MixerInfo;
208 return MM_STATUS_SUCCESS;
209 }
210 /* move to next mixer entry */
211 Entry = Entry->Flink;
212 }
213
215}
#define DPRINT1
Definition: precomp.h:8
@ MM_STATUS_UNSUCCESSFUL
Definition: mmixer.h:11
struct MIXER_INFO * LPMIXER_INFO
MIXERCAPSW MixCaps
Definition: precomp.h:70
WCHAR szPname[MAXPNAMELEN]
Definition: mmsystem.h:1226

◆ MMixerGetMixerControlById()

MIXER_STATUS MMixerGetMixerControlById ( LPMIXER_INFO  MixerInfo,
DWORD  dwControlID,
LPMIXERLINE_EXT OutMixerLine,
LPMIXERCONTROL_EXT OutMixerControl,
PULONG  NodeId 
)

Definition at line 278 of file sup.c.

284{
285 PLIST_ENTRY Entry, ControlEntry;
286 LPMIXERLINE_EXT MixerLineSrc;
287 LPMIXERCONTROL_EXT MixerControl;
288
289 /* get first entry */
290 Entry = MixerInfo->LineList.Flink;
291
292 while(Entry != &MixerInfo->LineList)
293 {
295
296 ControlEntry = MixerLineSrc->ControlsList.Flink;
297 while(ControlEntry != &MixerLineSrc->ControlsList)
298 {
299 MixerControl = (LPMIXERCONTROL_EXT)CONTAINING_RECORD(ControlEntry, MIXERCONTROL_EXT, Entry);
300 if (MixerControl->Control.dwControlID == dwControlID)
301 {
302 if (OutMixerLine)
303 *OutMixerLine = MixerLineSrc;
304 if (OutMixerControl)
305 *OutMixerControl = MixerControl;
306 if (NodeId)
307 *NodeId = MixerControl->NodeID;
308 return MM_STATUS_SUCCESS;
309 }
310 ControlEntry = ControlEntry->Flink;
311 }
312 Entry = Entry->Flink;
313 }
314
316}
struct MIXERLINE_EXT * LPMIXERLINE_EXT
struct MIXERCONTROL_EXT * LPMIXERCONTROL_EXT
MIXERCONTROLW Control
Definition: precomp.h:79
ULONG NodeID
Definition: precomp.h:80
LIST_ENTRY ControlsList
Definition: precomp.h:90
LIST_ENTRY LineList
Definition: precomp.h:71
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121

Referenced by MMixerGetControlDetails(), MMixerGetLineControls(), and MMixerSetControlDetails().

◆ MMixerGetMixerDataByDeviceHandle()

LPMIXER_DATA MMixerGetMixerDataByDeviceHandle ( IN PMIXER_CONTEXT  MixerContext,
IN HANDLE  hDevice 
)

Definition at line 128 of file sup.c.

131{
132 LPMIXER_DATA MixerData;
134 PMIXER_LIST MixerList;
135
136 /* get mixer list */
138
139 if (!MixerList->MixerDataCount)
140 return NULL;
141
142 Entry = MixerList->MixerData.Flink;
143
144 while(Entry != &MixerList->MixerData)
145 {
147
148 if (MixerData->hDevice == hDevice)
149 return MixerData;
150
151 /* move to next mixer entry */
152 Entry = Entry->Flink;
153 }
154 return NULL;
155}
if(dx< 0)
Definition: linetemp.h:194
struct MIXER_LIST * PMIXER_LIST
PVOID MixerContext
Definition: mmixer.h:92
ULONG MixerDataCount
Definition: precomp.h:152
LIST_ENTRY MixerData
Definition: precomp.h:153

Referenced by MMixerSetGetMuxControlDetails().

◆ MMixerGetMixerInfoByIndex()

LPMIXER_INFO MMixerGetMixerInfoByIndex ( IN PMIXER_CONTEXT  MixerContext,
IN ULONG  MixerIndex 
)

Definition at line 158 of file sup.c.

161{
162 LPMIXER_INFO MixerInfo;
164 PMIXER_LIST MixerList;
165 ULONG Index = 0;
166
167 /* get mixer list */
169
170 if (!MixerList->MixerListCount)
171 return NULL;
172
173 Entry = MixerList->MixerList.Flink;
174
175 while(Entry != &MixerList->MixerList)
176 {
178
179 if (Index == MixerIndex)
180 return MixerInfo;
181
182 /* move to next mixer entry */
183 Index++;
184 Entry = Entry->Flink;
185 }
186
187 return NULL;
188}
ULONG MixerListCount
Definition: precomp.h:149
LIST_ENTRY MixerList
Definition: precomp.h:150

Referenced by MMixerClose(), MMixerGetCapabilities(), MMixerGetControlDetails(), MMixerGetLineControls(), MMixerGetLineInfo(), MMixerOpen(), MMixerPrintMixers(), and MMixerSetControlDetails().

◆ MMixerGetMixerLineContainingNodeId()

LPMIXERLINE_EXT MMixerGetMixerLineContainingNodeId ( IN LPMIXER_INFO  MixerInfo,
IN ULONG  NodeID 
)

Definition at line 58 of file sup.c.

61{
62 PLIST_ENTRY Entry, ControlEntry;
63 LPMIXERLINE_EXT MixerLineSrc;
64 LPMIXERCONTROL_EXT MixerControl;
65
66 /* get first entry */
67 Entry = MixerInfo->LineList.Flink;
68
69 while(Entry != &MixerInfo->LineList)
70 {
72
73 ControlEntry = MixerLineSrc->ControlsList.Flink;
74 while(ControlEntry != &MixerLineSrc->ControlsList)
75 {
76 MixerControl = (LPMIXERCONTROL_EXT)CONTAINING_RECORD(ControlEntry, MIXERCONTROL_EXT, Entry);
77 if (MixerControl->NodeID == NodeID)
78 {
79 return MixerLineSrc;
80 }
81 ControlEntry = ControlEntry->Flink;
82 }
83 Entry = Entry->Flink;
84 }
85
86 return NULL;
87}

Referenced by MMixerSetGetMuxControlDetails().

◆ MMixerGetNodeType()

LPGUID MMixerGetNodeType ( IN PKSMULTIPLE_ITEM  MultipleItem,
IN ULONG  Index 
)

Definition at line 242 of file sup.c.

245{
247
248 ASSERT(Index < MultipleItem->Count);
249
250 NodeType = (LPGUID)(MultipleItem + 1);
251 return &NodeType[Index];
252}
NodeType
Definition: Node.h:6
#define NodeType(P)
Definition: nodetype.h:51
int Count
Definition: noreturn.cpp:7
GUID * LPGUID
Definition: guiddef.h:81

◆ MMixerGetSourceMixerLineByComponentType()

LPMIXERLINE_EXT MMixerGetSourceMixerLineByComponentType ( LPMIXER_INFO  MixerInfo,
DWORD  dwComponentType 
)

Definition at line 255 of file sup.c.

258{
260 LPMIXERLINE_EXT MixerLineSrc;
261
262 /* get first entry */
263 Entry = MixerInfo->LineList.Flink;
264
265 while(Entry != &MixerInfo->LineList)
266 {
268 if (MixerLineSrc->Line.dwComponentType == dwComponentType)
269 return MixerLineSrc;
270
271 Entry = Entry->Flink;
272 }
273
274 return NULL;
275}
MIXERLINEW Line
Definition: precomp.h:89
DWORD dwComponentType
Definition: mmsystem.h:1261

Referenced by MMixerGetLineInfo().

◆ MMixerGetSourceMixerLineByLineId()

LPMIXERLINE_EXT MMixerGetSourceMixerLineByLineId ( LPMIXER_INFO  MixerInfo,
DWORD  dwLineID 
)

Definition at line 218 of file sup.c.

221{
223 LPMIXERLINE_EXT MixerLineSrc;
224
225 /* get first entry */
226 Entry = MixerInfo->LineList.Flink;
227
228 while(Entry != &MixerInfo->LineList)
229 {
231 DPRINT("dwLineID %x dwLineID %x MixerLineSrc %p\n", MixerLineSrc->Line.dwLineID, dwLineID, MixerLineSrc);
232 if (MixerLineSrc->Line.dwLineID == dwLineID)
233 return MixerLineSrc;
234
235 Entry = Entry->Flink;
236 }
237
238 return NULL;
239}
#define DPRINT
Definition: sndvol32.h:73
DWORD dwLineID
Definition: mmsystem.h:1258

Referenced by MMixerAddMixerControlsToDestinationLine(), MMixerAddMixerSourceLines(), MMixerBuildMixerSourceLine(), MMixerGetLineControls(), MMixerGetLineInfo(), MMixerHandleAlternativeMixers(), and MMixerPrintMixers().

◆ MMixerGetVolumeControlIndex()

ULONG MMixerGetVolumeControlIndex ( LPMIXERVOLUME_DATA  VolumeData,
LONG  Value 
)

Definition at line 319 of file sup.c.

322{
323 ULONG Index;
324
325 for(Index = 0; Index < VolumeData->ValuesCount; Index++)
326 {
327 if (VolumeData->Values[Index] > Value)
328 {
329 return VolumeData->InputSteppingDelta * Index;
330 }
331 }
332 return VolumeData->InputSteppingDelta * (VolumeData->ValuesCount-1);
333}
ULONG ValuesCount
Definition: precomp.h:107
ULONG InputSteppingDelta
Definition: precomp.h:106
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by MMixerSetGetVolumeControlDetails().

◆ MMixerInitializePinConnect()

VOID MMixerInitializePinConnect ( IN OUT PKSPIN_CONNECT  PinConnect,
IN ULONG  PinId 
)

Definition at line 901 of file sup.c.

904{
905 PinConnect->Interface.Set = KSINTERFACESETID_Standard;
906 PinConnect->Interface.Id = KSINTERFACE_STANDARD_STREAMING;
907 PinConnect->Interface.Flags = 0;
908 PinConnect->Medium.Set = KSMEDIUMSETID_Standard;
909 PinConnect->Medium.Id = KSMEDIUM_TYPE_ANYINSTANCE;
910 PinConnect->Medium.Flags = 0;
911 PinConnect->PinToHandle = NULL;
912 PinConnect->PinId = PinId;
913 PinConnect->Priority.PriorityClass = KSPRIORITY_NORMAL;
914 PinConnect->Priority.PrioritySubClass = 1;
915}
#define KSPRIORITY_NORMAL
Definition: ks.h:1386
#define KSMEDIUM_TYPE_ANYINSTANCE
Definition: ks.h:301
#define KSMEDIUMSETID_Standard
Definition: ks.h:306
@ KSINTERFACE_STANDARD_STREAMING
Definition: ks.h:283
#define KSINTERFACESETID_Standard
Definition: ks.h:280

Referenced by MMixerOpenMidiPin(), and MMixerOpenWavePin().

◆ MMixerNotifyControlChange()

VOID MMixerNotifyControlChange ( IN PMIXER_CONTEXT  MixerContext,
IN LPMIXER_INFO  MixerInfo,
IN ULONG  NotificationType,
IN ULONG  Value 
)

Definition at line 336 of file sup.c.

341{
344
345 /* enumerate list and perform notification */
346 Entry = MixerInfo->EventList.Flink;
347 while(Entry != &MixerInfo->EventList)
348 {
349 /* get notification entry offset */
351
352 if (NotificationEntry->MixerEventRoutine)
353 {
354 /* now perform the callback */
355 NotificationEntry->MixerEventRoutine(NotificationEntry->MixerEventContext, (HANDLE)MixerInfo, NotificationType, Value);
356 }
357
358 /* move to next notification entry */
359 Entry = Entry->Flink;
360 }
361}
struct EVENT_NOTIFICATION_ENTRY * PEVENT_NOTIFICATION_ENTRY
Definition: precomp.h:169
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE _Inout_opt_ __drv_aliasesMem PVOID _Outptr_result_nullonfailure_ _At_ * NotificationEntry(return==0, __drv_allocatesMem(Mem))) PVOID *NotificationEntry

Referenced by MMixerSetGetMuteControlDetails(), MMixerSetGetMuxControlDetails(), and MMixerSetGetVolumeControlDetails().

◆ MMixerSetGetMuteControlDetails()

MIXER_STATUS MMixerSetGetMuteControlDetails ( IN PMIXER_CONTEXT  MixerContext,
IN LPMIXER_INFO  MixerInfo,
IN LPMIXERCONTROL_EXT  MixerControl,
IN ULONG  dwLineID,
IN LPMIXERCONTROLDETAILS  MixerControlDetails,
IN ULONG  bSet 
)

Definition at line 364 of file sup.c.

371{
373 LONG Value;
375
376 if (MixerControlDetails->cbDetails != sizeof(MIXERCONTROLDETAILS_BOOLEAN))
378
379 /* get input */
380 Input = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
381
382 /* FIXME SEH */
383 if (bSet)
384 Value = Input->fValue;
385
386 /* set control details */
387 Status = MMixerSetGetControlDetails(MixerContext, MixerControl->hDevice, MixerControl->NodeID, bSet, KSPROPERTY_AUDIO_MUTE, 0, &Value);
388
390 return Status;
391
392 /* FIXME SEH */
393 if (!bSet)
394 {
395 Input->fValue = Value;
396 return Status;
397 }
398 else
399 {
400 /* notify wdmaud clients MM_MIXM_LINE_CHANGE dwLineID */
402 }
403
404 return Status;
405}
@ KSPROPERTY_AUDIO_MUTE
Definition: ksmedia.h:1066
@ MM_STATUS_INVALID_PARAMETER
Definition: mmixer.h:10
struct tMIXERCONTROLDETAILS_BOOLEAN * LPMIXERCONTROLDETAILS_BOOLEAN
#define MM_MIXM_LINE_CHANGE
Definition: mmsystem.h:82
long LONG
Definition: pedump.c:60
@ Input
Definition: arc.h:84
MIXER_STATUS MMixerSetGetControlDetails(IN PMIXER_CONTEXT MixerContext, IN HANDLE hMixer, IN ULONG NodeId, IN ULONG bSet, IN ULONG PropertyId, IN ULONG Channel, IN PLONG InputValue)
Definition: filter.c:214
VOID MMixerNotifyControlChange(IN PMIXER_CONTEXT MixerContext, IN LPMIXER_INFO MixerInfo, IN ULONG NotificationType, IN ULONG Value)
Definition: sup.c:336

Referenced by MMixerGetControlDetails(), and MMixerSetControlDetails().

◆ MMixerSetGetMuxControlDetails()

MIXER_STATUS MMixerSetGetMuxControlDetails ( IN PMIXER_CONTEXT  MixerContext,
IN LPMIXER_INFO  MixerInfo,
IN ULONG  NodeId,
IN ULONG  bSet,
IN ULONG  Flags,
IN LPMIXERCONTROL_EXT  MixerControl,
IN LPMIXERCONTROLDETAILS  MixerControlDetails,
IN LPMIXERLINE_EXT  MixerLine 
)

Definition at line 408 of file sup.c.

417{
419 PULONG LogicalNodes, ConnectedNodes;
420 ULONG LogicalNodesCount, ConnectedNodesCount, Index, CurLogicalPinOffset, BytesReturned, OldLogicalPinOffset;
421 LPMIXER_DATA MixerData;
424 LPMIXERLINE_EXT SourceLine;
426
427 DPRINT("MixerControlDetails %p\n", MixerControlDetails);
428 DPRINT("bSet %lx\n", bSet);
429 DPRINT("Flags %lx\n", Flags);
430 DPRINT("NodeId %lu\n", MixerControl->NodeID);
431 DPRINT("MixerControlDetails dwControlID %lu\n", MixerControlDetails->dwControlID);
432 DPRINT("MixerControlDetails cChannels %lu\n", MixerControlDetails->cChannels);
433 DPRINT("MixerControlDetails cMultipleItems %lu\n", MixerControlDetails->cMultipleItems);
434 DPRINT("MixerControlDetails cbDetails %lu\n", MixerControlDetails->cbDetails);
435 DPRINT("MixerControlDetails paDetails %p\n", MixerControlDetails->paDetails);
436
437 if (MixerControl->Control.fdwControl & MIXERCONTROL_CONTROLF_UNIFORM)
438 {
439 /* control acts uniform */
440 if (MixerControlDetails->cChannels != 1)
441 {
442 /* expected 1 channel */
443 DPRINT1("Expected 1 channel but got %lu\n", MixerControlDetails->cChannels);
445 }
446 }
447
448 /* check if multiple items match */
449 if (MixerControlDetails->cMultipleItems != MixerControl->Control.cMultipleItems)
450 {
451 DPRINT1("MultipleItems mismatch %lu expected %lu\n", MixerControlDetails->cMultipleItems, MixerControl->Control.cMultipleItems);
453 }
454
455 if (bSet)
456 {
458 {
459 /* tell me when this is hit */
460 ASSERT(FALSE);
461 }
463 {
464 /* sanity check */
465 ASSERT(bSet == TRUE);
466 ASSERT(MixerControlDetails->cbDetails == sizeof(MIXERCONTROLDETAILS_BOOLEAN));
467
468 Values = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
469 CurLogicalPinOffset = MAXULONG;
470 for(Index = 0; Index < MixerControlDetails->cMultipleItems; Index++)
471 {
472 if (Values[Index].fValue)
473 {
474 /* mux can only activate one line at a time */
475 ASSERT(CurLogicalPinOffset == MAXULONG);
476 CurLogicalPinOffset = Index;
477 }
478 }
479
480 /* setup request */
481 Request.NodeId = NodeId;
482 Request.Reserved = 0;
485 Request.Property.Set = KSPROPSETID_Audio;
486
487 /* perform getting source */
488 Status = MixerContext->Control(MixerControl->hDevice, IOCTL_KS_PROPERTY, (PVOID)&Request, sizeof(KSNODEPROPERTY), &OldLogicalPinOffset, sizeof(ULONG), &BytesReturned);
490 {
491 /* failed to get source */
492 return Status;
493 }
494
495 DPRINT("OldLogicalPinOffset %lu CurLogicalPinOffset %lu\n", OldLogicalPinOffset, CurLogicalPinOffset);
496
497 if (OldLogicalPinOffset == CurLogicalPinOffset)
498 {
499 /* cannot be unselected */
501 }
502
503 /* perform setting source */
505 Status = MixerContext->Control(MixerControl->hDevice, IOCTL_KS_PROPERTY, (PVOID)&Request, sizeof(KSNODEPROPERTY), &CurLogicalPinOffset, sizeof(ULONG), &BytesReturned);
507 {
508 /* failed to set source */
509 return Status;
510 }
511
512 /* notify control change */
513 MMixerNotifyControlChange(MixerContext, MixerInfo, MM_MIXM_CONTROL_CHANGE, MixerControl->Control.dwControlID );
514
515 return Status;
516 }
517 }
518 else
519 {
521 {
522 /* setup request */
523 Request.NodeId = NodeId;
524 Request.Reserved = 0;
527 Request.Property.Set = KSPROPSETID_Audio;
528
529 /* perform getting source */
530 Status = MixerContext->Control(MixerControl->hDevice, IOCTL_KS_PROPERTY, (PVOID)&Request, sizeof(KSNODEPROPERTY), &OldLogicalPinOffset, sizeof(ULONG), &BytesReturned);
532 {
533 /* failed to get source */
534 return Status;
535 }
536
537 /* gets the corresponding mixer data */
538 MixerData = MMixerGetMixerDataByDeviceHandle(MixerContext, MixerControl->hDevice);
539
540 /* sanity check */
541 ASSERT(MixerData);
542 ASSERT(MixerData->Topology);
543 ASSERT(MixerData->MixerInfo == MixerInfo);
544
545 /* now allocate logical pin array */
546 Status = MMixerAllocateTopologyNodeArray(MixerContext, MixerData->Topology, &LogicalNodes);
548 {
549 /* no memory */
550 return MM_STATUS_NO_MEMORY;
551 }
552
553 /* get logical pin nodes */
554 MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology, MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
555
556 /* sanity check */
557 ASSERT(LogicalNodesCount == MixerControlDetails->cMultipleItems);
558 ASSERT(LogicalNodesCount == MixerControl->Control.Metrics.dwReserved[0]);
559
560 Values = (LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
561 for(Index = 0; Index < LogicalNodesCount; Index++)
562 {
563 /* getting logical pin offset */
564 MMixerGetLowestLogicalTopologyPinOffsetFromArray(LogicalNodesCount, LogicalNodes, &CurLogicalPinOffset);
565
566 if (CurLogicalPinOffset == OldLogicalPinOffset)
567 {
568 /* mark index as active */
569 Values[Index].fValue = TRUE;
570 }
571 else
572 {
573 /* index not active */
574 Values[Index].fValue = FALSE;
575 }
576
577 /* mark offset as consumed */
578 LogicalNodes[CurLogicalPinOffset] = MAXULONG;
579 }
580
581 /* cleanup */
582 MixerContext->Free(LogicalNodes);
583
584 /* done */
585 return MM_STATUS_SUCCESS;
586 }
588 {
589 /* sanity check */
590 ASSERT(bSet == FALSE);
591
592 /* gets the corresponding mixer data */
593 MixerData = MMixerGetMixerDataByDeviceHandle(MixerContext, MixerControl->hDevice);
594
595 /* sanity check */
596 ASSERT(MixerData);
597 ASSERT(MixerData->Topology);
598 ASSERT(MixerData->MixerInfo == MixerInfo);
599
600 /* now allocate logical pin array */
601 Status = MMixerAllocateTopologyNodeArray(MixerContext, MixerData->Topology, &LogicalNodes);
603 {
604 /* no memory */
605 return MM_STATUS_NO_MEMORY;
606 }
607
608 /* allocate connected node array */
609 Status = MMixerAllocateTopologyNodeArray(MixerContext, MixerData->Topology, &ConnectedNodes);
611 {
612 /* no memory */
613 MixerContext->Free(LogicalNodes);
614 return MM_STATUS_NO_MEMORY;
615 }
616
617 /* get logical pin nodes */
618 MMixerGetConnectedFromLogicalTopologyPins(MixerData->Topology, MixerControl->NodeID, &LogicalNodesCount, LogicalNodes);
619
620 /* get connected nodes */
621 MMixerGetNextNodesFromNodeIndex(MixerContext, MixerData->Topology, MixerControl->NodeID, TRUE, &ConnectedNodesCount, ConnectedNodes);
622
623 /* sanity check */
624 ASSERT(ConnectedNodesCount == LogicalNodesCount);
625 ASSERT(ConnectedNodesCount == MixerControlDetails->cMultipleItems);
626 ASSERT(ConnectedNodesCount == MixerControl->Control.Metrics.dwReserved[0]);
627
628 ListText = (LPMIXERCONTROLDETAILS_LISTTEXTW)MixerControlDetails->paDetails;
629
630 for(Index = 0; Index < ConnectedNodesCount; Index++)
631 {
632 /* getting logical pin offset */
633 MMixerGetLowestLogicalTopologyPinOffsetFromArray(LogicalNodesCount, LogicalNodes, &CurLogicalPinOffset);
634
635 /* get mixer line with that node */
636 SourceLine = MMixerGetMixerLineContainingNodeId(MixerInfo, ConnectedNodes[CurLogicalPinOffset]);
637
638 /* sanity check */
639 ASSERT(SourceLine);
640
641 DPRINT1("PinOffset %lu LogicalPin %lu NodeId %lu LineName %S\n", CurLogicalPinOffset, LogicalNodes[CurLogicalPinOffset], ConnectedNodes[CurLogicalPinOffset], SourceLine->Line.szName);
642
643 /* copy details */
644 ListText[Index].dwParam1 = SourceLine->Line.dwLineID;
645 ListText[Index].dwParam2 = SourceLine->Line.dwComponentType;
646 MixerContext->Copy(ListText[Index].szName, SourceLine->Line.szName, (wcslen(SourceLine->Line.szName) + 1) * sizeof(WCHAR));
647
648 /* mark offset as consumed */
649 LogicalNodes[CurLogicalPinOffset] = MAXULONG;
650 }
651
652 /* cleanup */
653 MixerContext->Free(LogicalNodes);
654 MixerContext->Free(ConnectedNodes);
655
656 /* done */
657 return MM_STATUS_SUCCESS;
658 }
659 }
660
662}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
#define KSPROPERTY_TYPE_TOPOLOGY
Definition: dmksctrl.h:53
@ KSPROPERTY_AUDIO_MUX_SOURCE
Definition: ksmedia.h:1065
@ MM_STATUS_NOT_IMPLEMENTED
Definition: mmixer.h:7
#define MIXERCONTROL_CONTROLF_UNIFORM
Definition: mmsystem.h:350
#define MIXER_SETCONTROLDETAILSF_VALUE
Definition: mmsystem.h:415
#define MIXER_GETCONTROLDETAILSF_VALUE
Definition: mmsystem.h:412
#define MIXER_GETCONTROLDETAILSF_QUERYMASK
Definition: mmsystem.h:414
#define MM_MIXM_CONTROL_CHANGE
Definition: mmsystem.h:83
#define MIXER_SETCONTROLDETAILSF_CUSTOM
Definition: mmsystem.h:416
#define MIXER_SETCONTROLDETAILSF_QUERYMASK
Definition: mmsystem.h:417
#define MIXER_GETCONTROLDETAILSF_LISTTEXT
Definition: mmsystem.h:413
struct tagMIXERCONTROLDETAILS_LISTTEXTW * LPMIXERCONTROLDETAILS_LISTTEXTW
static const WCHAR szName[]
Definition: powrprof.c:45
VOID MMixerGetConnectedFromLogicalTopologyPins(IN PTOPOLOGY Topology, IN ULONG NodeIndex, OUT PULONG OutPinCount, OUT PULONG OutPins)
Definition: topology.c:1158
MIXER_STATUS MMixerAllocateTopologyNodeArray(IN PMIXER_CONTEXT MixerContext, IN PTOPOLOGY Topology, OUT PULONG *OutPins)
Definition: topology.c:1045
VOID MMixerGetNextNodesFromNodeIndex(IN PMIXER_CONTEXT MixerContext, IN PTOPOLOGY Topology, IN ULONG NodeIndex, IN ULONG bUpStream, OUT PULONG OutNodesCount, OUT PULONG OutNodes)
Definition: topology.c:965
const GUID KSPROPSETID_Audio
Definition: sup.c:29
VOID MMixerGetLowestLogicalTopologyPinOffsetFromArray(IN ULONG LogicalPinArrayCount, IN PULONG LogicalPinArray, OUT PULONG PinOffset)
Definition: sup.c:90
LPMIXERLINE_EXT MMixerGetMixerLineContainingNodeId(IN LPMIXER_INFO MixerInfo, IN ULONG NodeID)
Definition: sup.c:58
LPMIXER_DATA MMixerGetMixerDataByDeviceHandle(IN PMIXER_CONTEXT MixerContext, IN HANDLE hDevice)
Definition: sup.c:128
LPMIXER_INFO MixerInfo
Definition: precomp.h:119
WCHAR szName[MIXER_LONG_NAME_CHARS]
Definition: mmsystem.h:1266
uint32_t * PULONG
Definition: typedefs.h:59
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_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
Definition: wdfiotarget.h:1052
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

◆ MMixerSetGetVolumeControlDetails()

MIXER_STATUS MMixerSetGetVolumeControlDetails ( IN PMIXER_CONTEXT  MixerContext,
IN LPMIXER_INFO  MixerInfo,
IN ULONG  NodeId,
IN ULONG  bSet,
LPMIXERCONTROL_EXT  MixerControl,
IN LPMIXERCONTROLDETAILS  MixerControlDetails,
LPMIXERLINE_EXT  MixerLine 
)

Definition at line 665 of file sup.c.

673{
675 LONG Value;
676 ULONG Index, Channel = 0;
677 ULONG dwValue;
679 LPMIXERVOLUME_DATA VolumeData;
680
681 if (MixerControlDetails->cbDetails != sizeof(MIXERCONTROLDETAILS_SIGNED))
683
684 VolumeData = (LPMIXERVOLUME_DATA)MixerControl->ExtraData;
685 if (!VolumeData)
687
688 /* get input */
689 Input = (LPMIXERCONTROLDETAILS_UNSIGNED)MixerControlDetails->paDetails;
690 if (!Input)
691 return MM_STATUS_UNSUCCESSFUL; /* to prevent dereferencing NULL */
692
693 if (bSet)
694 {
695 /* FIXME SEH */
696 Value = Input->dwValue;
697 Index = Value / VolumeData->InputSteppingDelta;
698
699 if (Index >= VolumeData->ValuesCount)
700 {
701 DPRINT1("Index %u out of bounds %u \n", Index, VolumeData->ValuesCount);
703 }
704
705 Value = VolumeData->Values[Index];
706 }
707
708 /* set control details */
709 if (bSet)
710 {
711 /* TODO */
714 }
715 else
716 {
718 }
719
720 if (!bSet)
721 {
722 dwValue = MMixerGetVolumeControlIndex(VolumeData, (LONG)Value);
723 /* FIXME SEH */
724 Input->dwValue = dwValue;
725 }
726 else
727 {
728 /* notify clients of a line change MM_MIXM_CONTROL_CHANGE with MixerControl->dwControlID */
730 }
731 return Status;
732}
@ KSPROPERTY_AUDIO_VOLUMELEVEL
Definition: ksmedia.h:1057
struct tMIXERCONTROLDETAILS_UNSIGNED * LPMIXERCONTROLDETAILS_UNSIGNED
struct MIXERVOLUME_DATA * LPMIXERVOLUME_DATA
ULONG MMixerGetVolumeControlIndex(LPMIXERVOLUME_DATA VolumeData, LONG Value)
Definition: sup.c:319
HANDLE hDevice
Definition: precomp.h:81
PVOID ExtraData
Definition: precomp.h:82

Referenced by MMixerGetControlDetails(), and MMixerSetControlDetails().

◆ MMixerVerifyContext()

MIXER_STATUS MMixerVerifyContext ( IN PMIXER_CONTEXT  MixerContext)

Definition at line 40 of file sup.c.

42{
45
50
53
54 return MM_STATUS_SUCCESS;
55}
PMIXER_ALLOC_EVENT_DATA AllocEventData
Definition: mmixer.h:103
PMIXER_CLOSE Close
Definition: mmixer.h:98
ULONG SizeOfStruct
Definition: mmixer.h:91
PMIXER_FREE_EVENT_DATA FreeEventData
Definition: mmixer.h:104
PMIXER_OPEN Open
Definition: mmixer.h:97

Referenced by MMixerClose(), MMixerGetCapabilities(), MMixerGetControlDetails(), MMixerGetCount(), MMixerGetLineControls(), MMixerGetLineInfo(), MMixerGetMidiDevicePath(), MMixerGetMidiInCount(), MMixerGetMidiOutCount(), MMixerGetWaveDevicePath(), MMixerGetWaveInCount(), MMixerGetWaveOutCount(), MMixerGetWavePosition(), MMixerMidiInCapabilities(), MMixerMidiOutCapabilities(), MMixerOpen(), MMixerOpenMidi(), MMixerOpenWave(), MMixerSetControlDetails(), MMixerSetWaveResetState(), MMixerSetWaveStatus(), MMixerWaveInCapabilities(), and MMixerWaveOutCapabilities().

Variable Documentation

◆ KSDATAFORMAT_SPECIFIER_NONE

const GUID KSDATAFORMAT_SPECIFIER_NONE = {0x0F6417D6L, 0xC318, 0x11D0, {0xA4, 0x3F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}

Definition at line 37 of file sup.c.

◆ KSDATAFORMAT_SUBTYPE_MIDI

const GUID KSDATAFORMAT_SUBTYPE_MIDI = {0x1D262760L, 0xE957, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 36 of file sup.c.

◆ KSDATAFORMAT_TYPE_MUSIC

const GUID KSDATAFORMAT_TYPE_MUSIC = {0xE725D360L, 0x62CC, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 35 of file sup.c.

◆ KSEVENTSETID_AudioControlChange

const GUID KSEVENTSETID_AudioControlChange = {0xE85E9698L, 0xFA2F, 0x11D1, {0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}}

Definition at line 33 of file sup.c.

◆ KSNODETYPE_ADC

const GUID KSNODETYPE_ADC = {0x4D837FE0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 16 of file sup.c.

◆ KSNODETYPE_AGC

const GUID KSNODETYPE_AGC = {0xE88C9BA0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 17 of file sup.c.

◆ KSNODETYPE_CHORUS

const GUID KSNODETYPE_CHORUS = {0x20173F20L, 0xC559, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 25 of file sup.c.

◆ KSNODETYPE_DAC

const GUID KSNODETYPE_DAC = {0x507AE360L, 0xC554, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 15 of file sup.c.

◆ KSNODETYPE_LOUDNESS

const GUID KSNODETYPE_LOUDNESS = {0x41887440L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 18 of file sup.c.

◆ KSNODETYPE_MUTE

const GUID KSNODETYPE_MUTE = {0x02B223C0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 19 of file sup.c.

◆ KSNODETYPE_MUX

const GUID KSNODETYPE_MUX = {0x2CEAF780, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 23 of file sup.c.

◆ KSNODETYPE_PEAKMETER

const GUID KSNODETYPE_PEAKMETER = {0xa085651e, 0x5f0d, 0x4b36, {0xa8, 0x69, 0xd1, 0x95, 0xd6, 0xab, 0x4b, 0x9e}}

Definition at line 22 of file sup.c.

◆ KSNODETYPE_REVERB

const GUID KSNODETYPE_REVERB = {0xEF0328E0L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 26 of file sup.c.

◆ KSNODETYPE_STEREO_WIDE

const GUID KSNODETYPE_STEREO_WIDE = {0xA9E69800L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 24 of file sup.c.

◆ KSNODETYPE_SUM

const GUID KSNODETYPE_SUM = {0xDA441A60L, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 14 of file sup.c.

◆ KSNODETYPE_SUPERMIX

const GUID KSNODETYPE_SUPERMIX = {0xE573ADC0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 27 of file sup.c.

◆ KSNODETYPE_TONE

const GUID KSNODETYPE_TONE = {0x7607E580L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 20 of file sup.c.

◆ KSNODETYPE_VOLUME

const GUID KSNODETYPE_VOLUME = {0x3A5ACC00L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}}

Definition at line 21 of file sup.c.

◆ KSPROPSETID_Audio

const GUID KSPROPSETID_Audio = {0x45FFAAA0L, 0x6E1B, 0x11D0, {0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}

Definition at line 29 of file sup.c.

Referenced by MMixerSetGetMuxControlDetails().

◆ KSPROPSETID_General

const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}}

Definition at line 31 of file sup.c.

Referenced by MMixerGetDeviceNameWithComponentId().

◆ KSPROPSETID_Pin

const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}}

Definition at line 30 of file sup.c.

◆ KSPROPSETID_Topology

const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}

Definition at line 32 of file sup.c.