ReactOS 0.4.15-dev-8235-gcd88a97
auxil.c
Go to the documentation of this file.
1/*
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS Multimedia
5 * FILE: lib/mmdrv/auxil.c
6 * PURPOSE: Multimedia User Mode Driver
7 * PROGRAMMER: Andrew Greenwood
8 * Aleksey Bragin
9 * UPDATE HISTORY:
10 * Mar 16, 2004: Created skeleton implementation
11 */
12
13#include "mmdrv.h"
14
15#define NDEBUG
16#include <debug.h>
17
18#include "wave.h"
19
21 UINT uMessage,
22 DWORD dwUser,
23 DWORD dwParam1,
24 DWORD dwParam2)
25
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}
67
68
69DWORD AuxGetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
70{
74
77 return Result;
78
79
82
83
85
86 return Result;
87 }
88
89DWORD AuxSetAudio(DWORD dwID, PBYTE pVolume, DWORD sizeVolume)
90{
94
97 return Result;
98
101
102
104
105 return Result;
106 }
107
APIENTRY DWORD auxMessage(UINT dwId, UINT uMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
Definition: auxil.c:20
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
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 APIENTRY
Definition: api.h:79
#define CloseHandle
Definition: compat.h:739
#define GENERIC_READ
Definition: compat.h:135
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
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
#define IOCTL_AUX_SET_VOLUME
Definition: mmdef.h:81
@ AuxDevice
Definition: mmdrv.h:47
UINT MMRESULT
Definition: mmsystem.h:962
#define MMSYSERR_NOERROR
Definition: mmsystem.h:96
UNICODE_STRING Volume
Definition: fltkernel.h:1172
unsigned int UINT
Definition: ndis.h:50
#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:73
unsigned char * LPBYTE
Definition: typedefs.h:53
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247
_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