Counter Strike : Global Offensive Source Code
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.

195 lines
9.4 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. *
  5. * File: dsconf.h
  6. * Content: DirectSound configuration interface include file
  7. *
  8. **************************************************************************/
  9. #ifndef __DSCONF_INCLUDED__
  10. #define __DSCONF_INCLUDED__
  11. #ifndef __DSOUND_INCLUDED__
  12. #error dsound.h not included
  13. #endif // __DSOUND_INCLUDED__
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif // __cplusplus
  17. // DirectSound Private Component GUID {11AB3EC0-25EC-11d1-A4D8-00C04FC28ACA}
  18. DEFINE_GUID(CLSID_DirectSoundPrivate, 0x11ab3ec0, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  19. //
  20. // DirectSound Device Properties {84624F82-25EC-11d1-A4D8-00C04FC28ACA}
  21. //
  22. DEFINE_GUID(DSPROPSETID_DirectSoundDevice, 0x84624f82, 0x25ec, 0x11d1, 0xa4, 0xd8, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
  23. typedef enum
  24. {
  25. DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A = 1,
  26. DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 = 2,
  27. DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 = 3,
  28. DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W = 4,
  29. DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A = 5,
  30. DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W = 6,
  31. DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A = 7,
  32. DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W = 8,
  33. } DSPROPERTY_DIRECTSOUNDDEVICE;
  34. #if DIRECTSOUND_VERSION >= 0x0700
  35. #ifdef UNICODE
  36. #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
  37. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
  38. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
  39. #else // UNICODE
  40. #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
  41. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
  42. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
  43. #endif // UNICODE
  44. #else // DIRECTSOUND_VERSION >= 0x0700
  45. #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
  46. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
  47. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
  48. #endif // DIRECTSOUND_VERSION >= 0x0700
  49. typedef enum
  50. {
  51. DIRECTSOUNDDEVICE_TYPE_EMULATED,
  52. DIRECTSOUNDDEVICE_TYPE_VXD,
  53. DIRECTSOUNDDEVICE_TYPE_WDM
  54. } DIRECTSOUNDDEVICE_TYPE;
  55. typedef enum
  56. {
  57. DIRECTSOUNDDEVICE_DATAFLOW_RENDER,
  58. DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
  59. } DIRECTSOUNDDEVICE_DATAFLOW;
  60. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
  61. {
  62. LPSTR DeviceName; // waveIn/waveOut device name
  63. DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut)
  64. GUID DeviceId; // DirectSound device id
  65. } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA;
  66. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
  67. {
  68. LPWSTR DeviceName; // waveIn/waveOut device name
  69. DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Data flow (i.e. waveIn or waveOut)
  70. GUID DeviceId; // DirectSound device id
  71. } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA;
  72. #ifdef UNICODE
  73. #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
  74. #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
  75. #else // UNICODE
  76. #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
  77. #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
  78. #endif // UNICODE
  79. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
  80. {
  81. GUID DeviceId; // DirectSound device id
  82. CHAR DescriptionA[0x100]; // Device description (ANSI)
  83. WCHAR DescriptionW[0x100]; // Device description (Unicode)
  84. CHAR ModuleA[MAX_PATH]; // Device driver module (ANSI)
  85. WCHAR ModuleW[MAX_PATH]; // Device driver module (Unicode)
  86. DIRECTSOUNDDEVICE_TYPE Type; // Device type
  87. DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow
  88. ULONG WaveDeviceId; // Wave device id
  89. ULONG Devnode; // Devnode (or DevInst)
  90. } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA;
  91. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
  92. {
  93. DIRECTSOUNDDEVICE_TYPE Type; // Device type
  94. DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow
  95. GUID DeviceId; // DirectSound device id
  96. LPSTR Description; // Device description
  97. LPSTR Module; // Device driver module
  98. LPSTR Interface; // Device interface
  99. ULONG WaveDeviceId; // Wave device id
  100. } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA;
  101. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
  102. {
  103. DIRECTSOUNDDEVICE_TYPE Type; // Device type
  104. DIRECTSOUNDDEVICE_DATAFLOW DataFlow; // Device dataflow
  105. GUID DeviceId; // DirectSound device id
  106. LPWSTR Description; // Device description
  107. LPWSTR Module; // Device driver module
  108. LPWSTR Interface; // Device interface
  109. ULONG WaveDeviceId; // Wave device id
  110. } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA;
  111. #if DIRECTSOUND_VERSION >= 0x0700
  112. #ifdef UNICODE
  113. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
  114. #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
  115. #else // UNICODE
  116. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
  117. #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
  118. #endif // UNICODE
  119. #else // DIRECTSOUND_VERSION >= 0x0700
  120. #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
  121. #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
  122. #endif // DIRECTSOUND_VERSION >= 0x0700
  123. typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, LPVOID);
  124. typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, LPVOID);
  125. typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, LPVOID);
  126. #if DIRECTSOUND_VERSION >= 0x0700
  127. #ifdef UNICODE
  128. #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW
  129. #else // UNICODE
  130. #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA
  131. #endif // UNICODE
  132. #else // DIRECTSOUND_VERSION >= 0x0700
  133. #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1
  134. #endif // DIRECTSOUND_VERSION >= 0x0700
  135. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
  136. {
  137. LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 Callback; // Callback function pointer
  138. LPVOID Context; // Callback function context argument
  139. } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA;
  140. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
  141. {
  142. LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA Callback; // Callback function pointer
  143. LPVOID Context; // Callback function context argument
  144. } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA;
  145. typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
  146. {
  147. LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW Callback; // Callback function pointer
  148. LPVOID Context; // Callback function context argument
  149. } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA;
  150. #if DIRECTSOUND_VERSION >= 0x0700
  151. #ifdef UNICODE
  152. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
  153. #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
  154. #else // UNICODE
  155. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
  156. #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
  157. #endif // UNICODE
  158. #else // DIRECTSOUND_VERSION >= 0x0700
  159. #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
  160. #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
  161. #endif // DIRECTSOUND_VERSION >= 0x0700
  162. #ifdef __cplusplus
  163. }
  164. #endif // __cplusplus
  165. #endif // __DSCONF_INCLUDED__