ReactOS 0.4.15-dev-8021-g7ce96fd
auxil.c File Reference
#include "mmdrv.h"
#include <debug.h>
#include "wave.h"
Include dependency graph for auxil.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

APIENTRY DWORD auxMessage (UINT dwId, UINT uMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
 
DWORD AuxGetAudio (DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
 
DWORD AuxSetAudio (DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 15 of file auxil.c.

Function Documentation

◆ AuxGetAudio()

DWORD AuxGetAudio ( DWORD  dwID,
PBYTE  pVolume,
DWORD  sizeVolume 
)

Definition at line 69 of file auxil.c.

70{
74
77 return Result;
78
79
82
83
85
86 return Result;
87 }
MMRESULT OpenDevice(DeviceInfo **private_data, MIDIOPENDESC *open_desc, DWORD flags)
Definition: beepmidi.c:264
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)
Definition: deviceio.c:136
#define NULL
Definition: types.h:112
#define CloseHandle
Definition: compat.h:739
#define GENERIC_READ
Definition: compat.h:135
DWORD TranslateStatus(void)
Definition: utils.c:30
unsigned long DWORD
Definition: ntddk_ex.h:95
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
#define IOCTL_AUX_GET_VOLUME
Definition: mmdef.h:82
@ AuxDevice
Definition: mmdrv.h:47
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
_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
_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 auxMessage().

◆ auxMessage()

APIENTRY DWORD auxMessage ( UINT  dwId,
UINT  uMessage,
DWORD  dwUser,
DWORD  dwParam1,
DWORD  dwParam2 
)

Definition at line 20 of file auxil.c.

26{
29
30 DPRINT("auxMessage\n");
31
32
33 // the following cases are documented by DDK
34 switch (uMessage)
35 {
37 DPRINT("AUXDM_GETDEVCAPS");
38 return GetDeviceCapabilities(dwId, AuxDevice, (LPBYTE)dwParam1, (DWORD)dwParam2);
39
41 DPRINT("AUXDM_GETNUMDEVS");
43
44 case AUXDM_GETVOLUME:
45 DPRINT("AUXDM_GETVOLUME");
46 Result = AuxGetAudio(dwId, (PBYTE) &Volume, sizeof(Volume));
47
49 {
50 *(LPDWORD)dwParam1 = (DWORD)MAKELONG(HIWORD(Volume.Left), HIWORD(Volume.Right));
51 }
52 return Result;
53
54
55 case AUXDM_SETVOLUME:
56 DPRINT("AUXDM_SETVOLUME");
57
58 Volume.Right = HIWORD(dwParam1) << 16;
59 Volume.Left = LOWORD(dwParam1) << 16;
60
61 return AuxSetAudio(dwId, (PBYTE)&Volume, sizeof(Volume));
62
63 }
64
65 return MMSYSERR_NOERROR;
66}
DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:89
DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
Definition: auxil.c:69
MMRESULT GetDeviceCapabilities(MIDIOUTCAPS *caps)
Definition: beepmidi.c:210
DWORD GetDeviceCount(DeviceType device_type)
Definition: common.c:58
#define AUXDM_GETDEVCAPS
Definition: mmddk.h:183
#define AUXDM_GETNUMDEVS
Definition: mmddk.h:182
#define AUXDM_GETVOLUME
Definition: mmddk.h:184
#define AUXDM_SETVOLUME
Definition: mmddk.h:185
UNICODE_STRING Volume
Definition: fltkernel.h:1172
#define LPDWORD
Definition: nt_native.h:46
#define LOWORD(l)
Definition: pedump.c:82
BYTE * PBYTE
Definition: pedump.c:66
#define DPRINT
Definition: sndvol32.h:71
unsigned char * LPBYTE
Definition: typedefs.h:53
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by MMDRV_Install().

◆ AuxSetAudio()

DWORD AuxSetAudio ( DWORD  dwID,
PBYTE  pVolume,
DWORD  sizeVolume 
)

Definition at line 89 of file auxil.c.

90{
94
97 return Result;
98
101
102
104
105 return Result;
106 }
#define IOCTL_AUX_SET_VOLUME
Definition: mmdef.h:81

Referenced by auxMessage().