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.

146 lines
5.1 KiB

  1. /*****************************************************************************
  2. *
  3. * Component: sndvol32.exe
  4. * File: pvcd.h
  5. * Purpose: Volume Control Descriptor
  6. *
  7. * Copyright (c) 1985-1995 Microsoft Corporation
  8. *
  9. *****************************************************************************/
  10. #define VCD_TYPE_MIXER 0
  11. #define VCD_TYPE_AUX 1
  12. #define VCD_TYPE_WAVEOUT 2
  13. #define VCD_TYPE_MIDIOUT 3
  14. #define VCD_SUPPORTF_STEREO 0x00000000
  15. #define VCD_SUPPORTF_MONO 0x00000001
  16. #define VCD_SUPPORTF_DISABLED 0x00000002
  17. #define VCD_SUPPORTF_HIDDEN 0x00000004 // hidden by choice
  18. #define VCD_SUPPORTF_BADDRIVER 0x00000008
  19. #define VCD_SUPPORTF_VISIBLE 0x00000010 // not visible (i.e. no controls)
  20. #define VCD_SUPPORTF_DEFAULT 0x00000020 // default type
  21. #define VCD_SUPPORTF_MIXER_MUTE 0x00010000
  22. #define VCD_SUPPORTF_MIXER_METER 0x00020000
  23. #define VCD_SUPPORTF_MIXER_MUX 0x00040000
  24. #define VCD_SUPPORTF_MIXER_MIXER 0x00080000
  25. #define VCD_SUPPORTF_MIXER_VOLUME 0x00100000
  26. #define VCD_SUPPORTF_MIXER_ADVANCED 0x80000000
  27. #define VCD_VISIBLEF_MIXER_MUTE 0x00000001
  28. #define VCD_VISIBLEF_MIXER_METER 0x00000002
  29. #define VCD_VISIBLEF_MIXER_MUX 0x00000004
  30. #define VCD_VISIBLEF_MIXER_MIXER 0x00000008
  31. #define VCD_VISIBLEF_MIXER_VOLUME 0x00000010
  32. #define VCD_VISIBLEF_MIXER_ADVANCED 0x00008000
  33. //
  34. // The generic volume control descriptor
  35. //
  36. typedef struct t_VOLCTRLDESC {
  37. //
  38. // for all
  39. //
  40. int iVCD; // descriptor index
  41. UINT iDeviceID; // device identifier
  42. DWORD dwType; // type bits
  43. DWORD dwSupport; // support bits
  44. DWORD dwVisible; // control visibility flags
  45. TCHAR szShortName[MIXER_SHORT_NAME_CHARS]; // short name
  46. TCHAR szName[MIXER_LONG_NAME_CHARS]; // line label
  47. struct t_MIXUILINE * pmxul; // back pointer to a ui
  48. union {
  49. struct {
  50. //
  51. // for mixer
  52. //
  53. HMIXER hmx; // open device handle
  54. BOOL fIsSource; // is source line
  55. DWORD dwDest; // destination index
  56. DWORD dwSrc; // source index
  57. DWORD dwLineID; // mixer line id
  58. DWORD dwVolumeID; // VOLUME control id
  59. DWORD fdwVolumeControl; // Control flags for Volume control
  60. //
  61. // For mixers and mux
  62. //
  63. DWORD dwMuteID; // MUTE control id
  64. DWORD fdwMuteControl; // Control flags for Mute control
  65. DWORD dwMeterID; // PEAKMETER control id
  66. DWORD dwMixerID; // MUX/MIXER control id
  67. DWORD iMixer; // mixer index
  68. DWORD cMixer; // mixer controls
  69. PMIXERCONTROLDETAILS_BOOLEAN amcd_bMixer;// mixer array
  70. DWORD dwMuxID; // MUX/MIXER control id
  71. DWORD iMux; // mux index
  72. DWORD cMux; // mux controls
  73. PMIXERCONTROLDETAILS_BOOLEAN amcd_bMux;// mux array
  74. double* pdblCacheMix; // Volume Channel mix cache
  75. };
  76. struct {
  77. //
  78. // for wave
  79. //
  80. HWAVEOUT hwo; // open device handle
  81. };
  82. struct {
  83. //
  84. // for midi
  85. //
  86. HMIDIOUT hmo; // open device handle
  87. };
  88. struct {
  89. //
  90. // for aux
  91. //
  92. DWORD dwParam; // nothing
  93. };
  94. };
  95. } VOLCTRLDESC, *PVOLCTRLDESC;
  96. extern PVOLCTRLDESC Mixer_CreateVolumeDescription(HMIXEROBJ hmx, int iDest, DWORD *pcvcd);
  97. extern void Mixer_CleanupVolumeDescription(PVOLCTRLDESC avcd, DWORD cvcd);
  98. extern int Mixer_GetNumDevs(void);
  99. extern BOOL Mixer_Init(PMIXUIDIALOG pmxud);
  100. extern void Mixer_GetControlFromID(PMIXUIDIALOG pmxud, DWORD dwControlID);
  101. extern void Mixer_GetControl(PMIXUIDIALOG pmxud, HWND hctl, int imxul, int ictl);
  102. extern void Mixer_SetControl(PMIXUIDIALOG pmxud, HWND hctl, int imxul, int ictl);
  103. extern void Mixer_PollingUpdate(PMIXUIDIALOG pmxud);
  104. extern void Mixer_Shutdown(PMIXUIDIALOG pmxud);
  105. extern BOOL Mixer_GetDeviceName(PMIXUIDIALOG pmxud);
  106. extern BOOL Mixer_IsValidRecordingDestination (HMIXEROBJ hmx, MIXERLINE* pmlDst);
  107. extern PVOLCTRLDESC Nonmixer_CreateVolumeDescription(int iDest, DWORD *pcvcd);
  108. extern int Nonmixer_GetNumDevs(void);
  109. extern BOOL Nonmixer_Init(PMIXUIDIALOG pmxud);
  110. extern void Nonmixer_GetControl(PMIXUIDIALOG pmxud, HWND hctl, int imxul, int ictl);
  111. extern void Nonmixer_SetControl(PMIXUIDIALOG pmxud, HWND hctl, int imxul, int ictl);
  112. extern void Nonmixer_PollingUpdate(PMIXUIDIALOG pmxud);
  113. extern void Nonmixer_Shutdown(PMIXUIDIALOG pmxud);
  114. extern BOOL Nonmixer_GetDeviceName(PMIXUIDIALOG pmxud);
  115. extern PVOLCTRLDESC PVCD_AddLine(PVOLCTRLDESC pvcd, int iDev, DWORD dwType, LPTSTR szProduct, LPTSTR szLabel, DWORD dwSupport, DWORD *cLines);