Subversion Repositories Games.Chess Giants

Rev

Blame | Last modification | View Log | Download | RSS feed

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