ReactOS 0.4.15-dev-8109-gd7be748
mxdMessage.c File Reference
#include "precomp.h"
Include dependency graph for mxdMessage.c:

Go to the source code of this file.

Functions

MMRESULT MmeGetLineInfo (IN UINT DeviceId, IN UINT Message, IN DWORD_PTR PrivateHandle, IN DWORD_PTR Parameter1, IN DWORD_PTR Parameter2)
 
DWORD APIENTRY mxdMessage (UINT DeviceId, UINT Message, DWORD_PTR PrivateHandle, DWORD_PTR Parameter1, DWORD_PTR Parameter2)
 

Function Documentation

◆ MmeGetLineInfo()

MMRESULT MmeGetLineInfo ( IN UINT  DeviceId,
IN UINT  Message,
IN DWORD_PTR  PrivateHandle,
IN DWORD_PTR  Parameter1,
IN DWORD_PTR  Parameter2 
)

Definition at line 15 of file mxdMessage.c.

21{
23 PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
24 PSOUND_DEVICE SoundDevice;
26
27 //SND_TRACE(L"Getting mixer info %u\n", Message);
28
29 if ( PrivateHandle == 0 )
30 {
31 Result = GetSoundDevice(MIXER_DEVICE_TYPE, DeviceId, &SoundDevice);
32
33 if ( ! MMSUCCESS(Result) )
35
37 if ( ! MMSUCCESS(Result) )
39
40 Result = FunctionTable->QueryMixerInfo(NULL, DeviceId, Message, (LPVOID)Parameter1, Parameter2);
41 return Result;
42 }
43
44 VALIDATE_MMSYS_PARAMETER( PrivateHandle );
45 SoundDeviceInstance = (PSOUND_DEVICE_INSTANCE) PrivateHandle;
46
47 Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice);
48 if ( ! MMSUCCESS(Result) )
50
52 if ( ! MMSUCCESS(Result) )
54
55 if ( ! FunctionTable->QueryMixerInfo )
57
58 Result = FunctionTable->QueryMixerInfo(SoundDeviceInstance, DeviceId, Message, (LPVOID)Parameter1, Parameter2);
59
60 return Result;
61}
#define NULL
Definition: types.h:112
static const WCHAR Message[]
Definition: register.c:74
struct _SOUND_DEVICE_INSTANCE * PSOUND_DEVICE_INSTANCE
#define VALIDATE_MMSYS_PARAMETER(parameter_condition)
Definition: mmebuddy.h:71
MMRESULT GetSoundDeviceFunctionTable(IN PSOUND_DEVICE SoundDevice, OUT PMMFUNCTION_TABLE *FunctionTable)
Definition: functiontable.c:47
MMRESULT GetSoundDeviceFromInstance(IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, OUT PSOUND_DEVICE *SoundDevice)
MMRESULT TranslateInternalMmResult(IN MMRESULT Result)
Definition: utility.c:132
#define MMSUCCESS(result)
Definition: mmebuddy.h:80
MMRESULT GetSoundDevice(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceIndex, OUT PSOUND_DEVICE *Device)
Definition: devicelist.c:289
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOTSUPPORTED
Definition: mmsystem.h:104
@ MIXER_DEVICE_TYPE
Definition: sndtypes.h:33
static WLX_DISPATCH_VERSION_1_4 FunctionTable
Definition: wlx.c:722
_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
Definition: wsk.h:409

Referenced by mxdMessage().

◆ mxdMessage()

DWORD APIENTRY mxdMessage ( UINT  DeviceId,
UINT  Message,
DWORD_PTR  PrivateHandle,
DWORD_PTR  Parameter1,
DWORD_PTR  Parameter2 
)

Definition at line 69 of file mxdMessage.c.

75{
77
79
80 //SND_TRACE(L"mxdMessage - Message type %d\n", Message);
81
82 switch ( Message )
83 {
84 case MXDM_GETNUMDEVS :
85 {
87 break;
88 }
89
90 case MXDM_GETDEVCAPS :
91 {
93 DeviceId,
94 (PVOID) Parameter1,
95 Parameter2);
96 break;
97 }
98
99 case MXDM_INIT :
100 {
102 break;
103 }
104
105 case MXDM_OPEN :
106 {
108 DeviceId,
109 (LPWAVEOPENDESC) Parameter1, /* unused */
110 Parameter2,
111 (DWORD_PTR*) PrivateHandle);
112 VALIDATE_MMSYS_PARAMETER(*(DWORD_PTR*)PrivateHandle);
113 break;
114 }
115
116 case MXDM_CLOSE :
117 {
118 Result = MmeCloseDevice(PrivateHandle);
119
120 break;
121 }
122
124 {
125 Result = MmeGetLineInfo(DeviceId,
126 Message,
127 PrivateHandle,
128 Parameter1,
129 Parameter2);
130
131 break;
132 }
133
135 {
136 Result = MmeGetLineInfo(DeviceId,
137 Message,
138 PrivateHandle,
139 Parameter1,
140 Parameter2);
141
142 break;
143 }
144
146 {
147 Result = MmeGetLineInfo(DeviceId,
148 Message,
149 PrivateHandle,
150 Parameter1,
151 Parameter2);
152
153 break;
154 }
155
156 case MXDM_GETLINEINFO :
157 {
158 Result = MmeGetLineInfo(DeviceId,
159 Message,
160 PrivateHandle,
161 Parameter1,
162 Parameter2);
163
164 break;
165 }
166
168 {
169 Result = MmeGetDeviceInterfaceString(MIXER_DEVICE_TYPE, DeviceId, NULL, 0, (DWORD*)Parameter1); //FIXME DWORD_PTR
170 break;
171 }
172
174 {
175 Result = MmeGetDeviceInterfaceString(MIXER_DEVICE_TYPE, DeviceId, (LPWSTR)Parameter1, Parameter2, NULL); //FIXME DWORD_PTR
176 break;
177 }
178
179 }
180
181 //SND_TRACE(L"mxdMessage returning MMRESULT %d\n", Result);
182
184
185 return Result;
186}
#define DRV_QUERYDEVICEINTERFACESIZE
Definition: mmddk.h:97
#define MXDM_GETCONTROLDETAILS
Definition: mmddk.h:197
#define MXDM_GETLINECONTROLS
Definition: mmddk.h:196
#define MXDM_INIT
Definition: mmddk.h:187
#define MXDM_SETCONTROLDETAILS
Definition: mmddk.h:198
#define MXDM_OPEN
Definition: mmddk.h:193
#define MXDM_GETDEVCAPS
Definition: mmddk.h:192
#define MXDM_GETLINEINFO
Definition: mmddk.h:195
#define DRV_QUERYDEVICEINTERFACE
Definition: mmddk.h:96
#define MXDM_CLOSE
Definition: mmddk.h:194
#define MXDM_GETNUMDEVS
Definition: mmddk.h:191
unsigned long DWORD
Definition: ntddk_ex.h:95
MMRESULT MmeOpenDevice(IN MMDEVICE_TYPE DeviceType, IN UINT DeviceId, IN LPWAVEOPENDESC OpenParameters, IN DWORD Flags, OUT DWORD_PTR *PrivateHandle)
Definition: mmewrap.c:132
MMRESULT MmeCloseDevice(IN DWORD_PTR PrivateHandle)
Definition: mmewrap.c:225
VOID AcquireEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:75
ULONG GetSoundDeviceCount(IN MMDEVICE_TYPE DeviceType)
Definition: devicelist.c:67
MMRESULT MmeGetDeviceInterfaceString(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN LPWSTR Interface, IN DWORD InterfaceLength, OUT DWORD *InterfaceSize)
Definition: mmewrap.c:294
VOID ReleaseEntrypointMutex(IN MMDEVICE_TYPE DeviceType)
Definition: reentrancy.c:92
MMRESULT MmeGetSoundDeviceCapabilities(IN MMDEVICE_TYPE DeviceType, IN DWORD DeviceId, IN PVOID Capabilities, IN DWORD CapabilitiesSize)
Definition: mmewrap.c:103
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
MMRESULT MmeGetLineInfo(IN UINT DeviceId, IN UINT Message, IN DWORD_PTR PrivateHandle, IN DWORD_PTR Parameter1, IN DWORD_PTR Parameter2)
Definition: mxdMessage.c:15
uint32_t DWORD_PTR
Definition: typedefs.h:65
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by MMDRV_Install().