|
|
1.1 root 1: /****************************************************************************
2: *
3: * auxdd.c
4: *
5: * Multimedia kernel driver support component (mmdrv)
6: *
7: * Copyright (c) 1991-1992 Microsoft Corporation. All Rights Reserved.
8: *
9: * Driver for wave input and output devices
10: *
11: * -- Aux driver entry point(auxMessage)
12: *
13: * History
14: * 25-Aug-1992 - Robin Speed (RobinSp) wrote it
15: *
16: ***************************************************************************/
17:
18: #include "mmdrv.h"
19: #include <ntddaux.h>
20:
21: /****************************************************************************
22:
23: This function conforms to the standard Aux driver message proc
24: (auxMessage), which is documented in the DDK.
25:
26: ****************************************************************************/
27: DWORD auxMessage(UINT uDevice,
28: UINT uMsg,
29: DWORD dwUser,
30: DWORD dwParam1,
31: DWORD dwParam2)
32:
33: {
34: MMRESULT mRet;
35: AUX_DD_VOLUME Volume;
36:
37: switch (uMsg) {
38: case AUXDM_GETDEVCAPS:
39: dprintf2(("AUXDM_GETDEVCAPS"));
40: return sndGetData(AuxDevice, uDevice, dwParam2, (LPBYTE)dwParam1,
41: IOCTL_AUX_GET_CAPABILITIES);
42:
43: case AUXDM_GETNUMDEVS:
44: dprintf2(("AUXDM_GETNUMDEVS"));
45: return sndGetNumDevs(AuxDevice);
46:
47: case AUXDM_GETVOLUME:
48: dprintf2(("AUXDM_GETVOLUME"));
49:
50: mRet = sndGetData(AuxDevice, uDevice, sizeof(Volume),
51: (PBYTE)&Volume, IOCTL_AUX_GET_VOLUME);
52:
53: if (mRet == MMSYSERR_NOERROR) {
54: *(LPDWORD)dwParam1 =
55: (DWORD)MAKELONG(HIWORD(Volume.Left),
56: HIWORD(Volume.Right));
57: }
58:
59: return mRet;
60:
61: case AUXDM_SETVOLUME:
62: dprintf2(("AUXDM_SETVOLUME"));
63: Volume.Left = LOWORD(dwParam1) << 16;
64: Volume.Right = HIWORD(dwParam1) << 16;
65:
66: return sndSetData(AuxDevice, uDevice, sizeof(Volume),
67: (PBYTE)&Volume, IOCTL_AUX_SET_VOLUME);
68: }
69: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.