Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.0 KiB

  1. /****************************************************************************
  2. *
  3. * auxdd.c
  4. *
  5. * Multimedia kernel driver support component (mmdrv)
  6. *
  7. * Copyright (c) 1991-1998 Microsoft Corporation
  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. #include "mmdrv.h"
  18. #include <ntddaux.h>
  19. /****************************************************************************
  20. This function conforms to the standard Aux driver message proc
  21. (auxMessage), which is documented in the DDK.
  22. ****************************************************************************/
  23. DWORD auxMessage(UINT uDevice,
  24. UINT uMsg,
  25. DWORD_PTR dwUser,
  26. DWORD_PTR dwParam1,
  27. DWORD_PTR dwParam2)
  28. {
  29. MMRESULT mRet;
  30. AUX_DD_VOLUME Volume;
  31. switch (uMsg) {
  32. case AUXDM_GETDEVCAPS:
  33. dprintf2(("AUXDM_GETDEVCAPS"));
  34. return sndGetData(AuxDevice, uDevice, (DWORD)dwParam2, (LPBYTE)dwParam1,
  35. IOCTL_AUX_GET_CAPABILITIES);
  36. case AUXDM_GETNUMDEVS:
  37. dprintf2(("AUXDM_GETNUMDEVS"));
  38. return sndGetNumDevs(AuxDevice);
  39. case AUXDM_GETVOLUME:
  40. dprintf2(("AUXDM_GETVOLUME"));
  41. mRet = sndGetData(AuxDevice, uDevice, sizeof(Volume),
  42. (PBYTE)&Volume, IOCTL_AUX_GET_VOLUME);
  43. if (mRet == MMSYSERR_NOERROR) {
  44. *(LPDWORD)dwParam1 =
  45. (DWORD)MAKELONG(HIWORD(Volume.Left),
  46. HIWORD(Volume.Right));
  47. }
  48. return mRet;
  49. case AUXDM_SETVOLUME:
  50. dprintf2(("AUXDM_SETVOLUME"));
  51. Volume.Left = LOWORD(dwParam1) << 16;
  52. Volume.Right = HIWORD(dwParam1) << 16;
  53. return sndSetData(AuxDevice, uDevice, sizeof(Volume),
  54. (PBYTE)&Volume, IOCTL_AUX_SET_VOLUME);
  55. }
  56. return MMSYSERR_NOTSUPPORTED;
  57. }