Subversion Repositories Games.Chess Giants

Rev

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

  1. /*-========================================================================-_
  2.  |                               - X3DAUDIO -                               |
  3.  |        Copyright (c) Microsoft Corporation.  All rights reserved.        |
  4.  |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
  5.  |PROJECT: X3DAudio                     MODEL:   Unmanaged User-mode        |
  6.  |VERSION: 1.6                          EXCEPT:  No Exceptions              |
  7.  |CLASS:   N / A                        MINREQ:  WinXP, Xbox360             |
  8.  |BASE:    N / A                        DIALECT: MSC++ 14.00                |
  9.  |>------------------------------------------------------------------------<|
  10.  | DUTY: Cross-platform stand-alone 3D audio math library                   |
  11.  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  12.   NOTES:
  13.     1.  USE THE DEBUG DLL TO ENABLE PARAMETER VALIDATION VIA ASSERTS!
  14.         Here's how:
  15.         Copy X3DAudioDX_X.dll to where your application exists.
  16.         The debug DLL can be found under %WINDIR%\system32.
  17.         Rename X3DAudioDX_X.dll to X3DAudioX_X.dll to use the debug version.
  18.  
  19.         Only parameters required by DSP settings being calculated as
  20.         stipulated by the calculation control flags are validated.
  21.  
  22.     2.  Definition of terms:
  23.             LFE: Low Frequency Effect -- always omnidirectional.
  24.             LPF: Low Pass Filter, divided into two classifications:
  25.                  Direct -- Applied to the direct signal path,
  26.                            used for obstruction/occlusion effects.
  27.                  Reverb -- Applied to the reverb signal path,
  28.                            used for occlusion effects only.
  29.  
  30.     3.  Volume level is expressed as a linear amplitude scaler:
  31.         1.0f represents no attenuation applied to the original signal,
  32.         0.5f denotes an attenuation of 6dB, and 0.0f results in silence.
  33.         Amplification (volume > 1.0f) is also allowed, and is not clamped.
  34.  
  35.         LPF values range from 1.0f representing all frequencies pass through,
  36.         to 0.0f which results in silence as all frequencies are filtered out.
  37.  
  38.     4.  X3DAudio uses a left-handed Cartesian coordinate system with values
  39.         on the x-axis increasing from left to right, on the y-axis from
  40.         bottom to top, and on the z-axis from near to far.
  41.         Azimuths are measured clockwise from a given reference direction.
  42.  
  43.         Distance measurement is with respect to user-defined world units.
  44.         Applications may provide coordinates using any system of measure
  45.         as all non-normalized calculations are scale invariant, with such
  46.         operations natively occurring in user-defined world unit space.
  47.         Metric constants are supplied only as a convenience.
  48.         Distance is calculated using the Euclidean norm formula.
  49.  
  50.     5.  Only real values are permissible with functions using 32-bit
  51.         float parameters -- NAN and infinite values are not accepted.
  52.         All computation occurs in 32-bit precision mode.                    */
  53.  
  54. #pragma once
  55. //--------------<D-E-F-I-N-I-T-I-O-N-S>-------------------------------------//
  56. #include <windef.h>    // general windows types
  57. #if defined(_XBOX)
  58.     #include <vectorintrinsics.h>
  59. #endif
  60. #include <d3d9types.h> // for D3DVECTOR
  61.  
  62. // speaker geometry configuration flags, specifies assignment of channels to speaker positions, defined as per WAVEFORMATEXTENSIBLE.dwChannelMask
  63. #if !defined(_SPEAKER_POSITIONS_)
  64.     #define _SPEAKER_POSITIONS_
  65.     #define SPEAKER_FRONT_LEFT            0x00000001
  66.     #define SPEAKER_FRONT_RIGHT           0x00000002
  67.     #define SPEAKER_FRONT_CENTER          0x00000004
  68.     #define SPEAKER_LOW_FREQUENCY         0x00000008
  69.     #define SPEAKER_BACK_LEFT             0x00000010
  70.     #define SPEAKER_BACK_RIGHT            0x00000020
  71.     #define SPEAKER_FRONT_LEFT_OF_CENTER  0x00000040
  72.     #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080
  73.     #define SPEAKER_BACK_CENTER           0x00000100
  74.     #define SPEAKER_SIDE_LEFT             0x00000200
  75.     #define SPEAKER_SIDE_RIGHT            0x00000400
  76.     #define SPEAKER_TOP_CENTER            0x00000800
  77.     #define SPEAKER_TOP_FRONT_LEFT        0x00001000
  78.     #define SPEAKER_TOP_FRONT_CENTER      0x00002000
  79.     #define SPEAKER_TOP_FRONT_RIGHT       0x00004000
  80.     #define SPEAKER_TOP_BACK_LEFT         0x00008000
  81.     #define SPEAKER_TOP_BACK_CENTER       0x00010000
  82.     #define SPEAKER_TOP_BACK_RIGHT        0x00020000
  83.     #define SPEAKER_RESERVED              0x7FFC0000 // bit mask locations reserved for future use
  84.     #define SPEAKER_ALL                   0x80000000 // used to specify that any possible permutation of speaker configurations
  85. #endif
  86.  
  87. // standard speaker geometry configurations, used with X3DAudioInitialize
  88. #if !defined(SPEAKER_MONO)
  89.     #define SPEAKER_MONO             SPEAKER_FRONT_CENTER
  90.     #define SPEAKER_STEREO           (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
  91.     #define SPEAKER_2POINT1          (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY)
  92.     #define SPEAKER_SURROUND         (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
  93.     #define SPEAKER_QUAD             (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
  94.     #define SPEAKER_4POINT1          (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
  95.     #define SPEAKER_5POINT1          (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
  96.     #define SPEAKER_7POINT1          (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)
  97.     #define SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_SIDE_LEFT  | SPEAKER_SIDE_RIGHT)
  98.     #define SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT  | SPEAKER_SIDE_RIGHT)
  99. #endif
  100.  
  101. // Xbox360 speaker geometry configuration, used with X3DAudioInitialize
  102. #if defined(_XBOX)
  103.     #define SPEAKER_XBOX SPEAKER_5POINT1
  104. #endif
  105.  
  106.  
  107. // size of instance handle in bytes
  108. #define X3DAUDIO_HANDLE_BYTESIZE 20
  109.  
  110. // float math constants
  111. #define X3DAUDIO_PI  3.141592654f
  112. #define X3DAUDIO_2PI 6.283185307f
  113.  
  114. // speed of sound in meters per second for dry air at approximately 20C, used with X3DAudioInitialize
  115. #define X3DAUDIO_SPEED_OF_SOUND 343.5f
  116.  
  117. // calculation control flags, used with X3DAudioCalculate
  118. #define X3DAUDIO_CALCULATE_MATRIX          0x00000001 // enable matrix coefficient table calculation
  119. #define X3DAUDIO_CALCULATE_DELAY           0x00000002 // enable delay time array calculation (stereo final mix only)
  120. #define X3DAUDIO_CALCULATE_LPF_DIRECT      0x00000004 // enable LPF direct-path coefficient calculation
  121. #define X3DAUDIO_CALCULATE_LPF_REVERB      0x00000008 // enable LPF reverb-path coefficient calculation
  122. #define X3DAUDIO_CALCULATE_REVERB          0x00000010 // enable reverb send level calculation
  123. #define X3DAUDIO_CALCULATE_DOPPLER         0x00000020 // enable doppler shift factor calculation
  124. #define X3DAUDIO_CALCULATE_EMITTER_ANGLE   0x00000040 // enable emitter-to-listener interior angle calculation
  125.  
  126. #define X3DAUDIO_CALCULATE_ZEROCENTER      0x00010000 // do not position to front center speaker, signal positioned to remaining speakers instead, front center destination channel will be zero in returned matrix coefficient table, valid only for matrix calculations with final mix formats that have a front center channel
  127. #define X3DAUDIO_CALCULATE_REDIRECT_TO_LFE 0x00020000 // apply equal mix of all source channels to LFE destination channel, valid only for matrix calculations with sources that have no LFE channel and final mix formats that have an LFE channel
  128.  
  129.  
  130. //--------------<D-A-T-A---T-Y-P-E-S>---------------------------------------//
  131. #pragma pack(push, 1) // set packing alignment to ensure consistency across arbitrary build environments
  132.  
  133.  
  134. // primitive types
  135. typedef float FLOAT32; // 32-bit IEEE float
  136. typedef D3DVECTOR X3DAUDIO_VECTOR; // float 3D vector
  137.  
  138. // instance handle of precalculated constants
  139. typedef BYTE X3DAUDIO_HANDLE[X3DAUDIO_HANDLE_BYTESIZE];
  140.  
  141.  
  142. // Distance curve point:
  143. // Defines a DSP setting at a given normalized distance.
  144. typedef struct X3DAUDIO_DISTANCE_CURVE_POINT
  145. {
  146.     FLOAT32 Distance;   // normalized distance, must be within [0.0f, 1.0f]
  147.     FLOAT32 DSPSetting; // DSP setting
  148. } X3DAUDIO_DISTANCE_CURVE_POINT, *LPX3DAUDIO_DISTANCE_CURVE_POINT;
  149.  
  150. // Distance curve:
  151. // A piecewise curve made up of linear segments used to
  152. // define DSP behaviour with respect to normalized distance.
  153. //
  154. // Note that curve point distances are normalized within [0.0f, 1.0f].
  155. // X3DAUDIO_EMITTER.CurveDistanceScaler must be used to scale the
  156. // normalized distances to user-defined world units.
  157. // For distances beyond CurveDistanceScaler * 1.0f,
  158. // pPoints[PointCount-1].DSPSetting is used as the DSP setting.
  159. //
  160. // All distance curve spans must be such that:
  161. //      pPoints[k-1].DSPSetting + ((pPoints[k].DSPSetting-pPoints[k-1].DSPSetting) / (pPoints[k].Distance-pPoints[k-1].Distance)) * (pPoints[k].Distance-pPoints[k-1].Distance) != NAN or infinite values
  162. // For all points in the distance curve where 1 <= k < PointCount.
  163. typedef struct X3DAUDIO_DISTANCE_CURVE
  164. {
  165.     X3DAUDIO_DISTANCE_CURVE_POINT* pPoints;    // distance curve point array, must have at least PointCount elements with no duplicates and be sorted in ascending order with respect to Distance
  166.     UINT32                         PointCount; // number of distance curve points, must be >= 2 as all distance curves must have at least two endpoints, defining DSP settings at 0.0f and 1.0f normalized distance
  167. } X3DAUDIO_DISTANCE_CURVE, *LPX3DAUDIO_DISTANCE_CURVE;
  168. static const X3DAUDIO_DISTANCE_CURVE_POINT X3DAudioDefault_LinearCurvePoints[2] = { 0.0f, 1.0f, 1.0f, 0.0f };
  169. static const X3DAUDIO_DISTANCE_CURVE       X3DAudioDefault_LinearCurve          = { (X3DAUDIO_DISTANCE_CURVE_POINT*)&X3DAudioDefault_LinearCurvePoints[0], 2 };
  170.  
  171. // Cone:
  172. // Specifies directionality for a listener or single-channel emitter by
  173. // modifying DSP behaviour with respect to its front orientation.
  174. // This is modeled using two sound cones: an inner cone and an outer cone.
  175. // On/within the inner cone, DSP settings are scaled by the inner values.
  176. // On/beyond the outer cone, DSP settings are scaled by the outer values.
  177. // If on both the cones, DSP settings are scaled by the inner values only.
  178. // Between the two cones, the scaler is linearly interpolated between the
  179. // inner and outer values.  Set both cone angles to 0 or X3DAUDIO_2PI for
  180. // omnidirectionality using only the outer or inner values respectively.
  181. typedef struct X3DAUDIO_CONE
  182. {
  183.     FLOAT32 InnerAngle; // inner cone angle in radians, must be within [0.0f, X3DAUDIO_2PI]
  184.     FLOAT32 OuterAngle; // outer cone angle in radians, must be within [InnerAngle, X3DAUDIO_2PI]
  185.  
  186.     FLOAT32 InnerVolume; // volume level scaler on/within inner cone, used only for matrix calculations, must be within [0.0f, 2.0f] when used
  187.     FLOAT32 OuterVolume; // volume level scaler on/beyond outer cone, used only for matrix calculations, must be within [0.0f, 2.0f] when used
  188.     FLOAT32 InnerLPF;    // LPF (both direct and reverb paths) coefficient subtrahend on/within inner cone, used only for LPF (both direct and reverb paths) calculations, must be within [0.0f, 1.0f] when used
  189.     FLOAT32 OuterLPF;    // LPF (both direct and reverb paths) coefficient subtrahend on/beyond outer cone, used only for LPF (both direct and reverb paths) calculations, must be within [0.0f, 1.0f] when used
  190.     FLOAT32 InnerReverb; // reverb send level scaler on/within inner cone, used only for reverb calculations, must be within [0.0f, 2.0f] when used
  191.     FLOAT32 OuterReverb; // reverb send level scaler on/beyond outer cone, used only for reverb calculations, must be within [0.0f, 2.0f] when used
  192. } X3DAUDIO_CONE, *LPX3DAUDIO_CONE;
  193. static const X3DAUDIO_CONE X3DAudioDefault_DirectionalCone = { X3DAUDIO_PI/2, X3DAUDIO_PI, 1.0f, 0.708f, 0.0f, 0.25f, 0.708f, 1.0f };
  194.  
  195.  
  196. // Listener:
  197. // Defines a point of 3D audio reception.
  198. //
  199. // The cone is directed by the listener's front orientation.
  200. typedef struct X3DAUDIO_LISTENER
  201. {
  202.     X3DAUDIO_VECTOR OrientFront; // orientation of front direction, used only for matrix and delay calculations or listeners with cones for matrix, LPF (both direct and reverb paths), and reverb calculations, must be normalized when used
  203.     X3DAUDIO_VECTOR OrientTop;   // orientation of top direction, used only for matrix and delay calculations, must be orthonormal with OrientFront when used
  204.  
  205.     X3DAUDIO_VECTOR Position; // position in user-defined world units, does not affect Velocity
  206.     X3DAUDIO_VECTOR Velocity; // velocity vector in user-defined world units/second, used only for doppler calculations, does not affect Position
  207.  
  208.     X3DAUDIO_CONE* pCone; // sound cone, used only for matrix, LPF (both direct and reverb paths), and reverb calculations, NULL specifies omnidirectionality
  209. } X3DAUDIO_LISTENER, *LPX3DAUDIO_LISTENER;
  210.  
  211. // Emitter:
  212. // Defines a 3D audio source, divided into two classifications:
  213. //
  214. // Single-point -- For use with single-channel sounds.
  215. //                 Positioned at the emitter base, i.e. the channel radius
  216. //                 and azimuth are ignored if the number of channels == 1.
  217. //
  218. //                 May be omnidirectional or directional using a cone.
  219. //                 The cone originates from the emitter base position,
  220. //                 and is directed by the emitter's front orientation.
  221. //
  222. // Multi-point  -- For use with multi-channel sounds.
  223. //                 Each non-LFE channel is positioned using an
  224. //                 azimuth along the channel radius with respect to the
  225. //                 front orientation vector in the plane orthogonal to the
  226. //                 top orientation vector.  An azimuth of X3DAUDIO_2PI
  227. //                 specifies a channel is an LFE.  Such channels are
  228. //                 positioned at the emitter base and are calculated
  229. //                 with respect to pLFECurve only, never pVolumeCurve.
  230. //
  231. //                 Multi-point emitters are always omnidirectional,
  232. //                 i.e. the cone is ignored if the number of channels > 1.
  233. //
  234. // Note that many properties are shared among all channel points,
  235. // locking certain behaviour with respect to the emitter base position.
  236. // For example, doppler shift is always calculated with respect to the
  237. // emitter base position and so is constant for all its channel points.
  238. // Distance curve calculations are also with respect to the emitter base
  239. // position, with the curves being calculated independently of each other.
  240. // For instance, volume and LFE calculations do not affect one another.
  241. typedef struct X3DAUDIO_EMITTER
  242. {
  243.     X3DAUDIO_CONE* pCone; // sound cone, used only with single-channel emitters for matrix, LPF (both direct and reverb paths), and reverb calculations, NULL specifies omnidirectionality
  244.     X3DAUDIO_VECTOR OrientFront; // orientation of front direction, used only for emitter angle calculations or with multi-channel emitters for matrix calculations or single-channel emitters with cones for matrix, LPF (both direct and reverb paths), and reverb calculations, must be normalized when used
  245.     X3DAUDIO_VECTOR OrientTop;   // orientation of top direction, used only with multi-channel emitters for matrix calculations, must be orthonormal with OrientFront when used
  246.  
  247.     X3DAUDIO_VECTOR Position; // position in user-defined world units, does not affect Velocity
  248.     X3DAUDIO_VECTOR Velocity; // velocity vector in user-defined world units/second, used only for doppler calculations, does not affect Position
  249.  
  250.     FLOAT32 InnerRadius;      // inner radius, must be within [0.0f, FLT_MAX]
  251.     FLOAT32 InnerRadiusAngle; // inner radius angle, must be within [0.0f, X3DAUDIO_PI/4.0)
  252.  
  253.     UINT32 ChannelCount;       // number of sound channels, must be > 0
  254.     FLOAT32 ChannelRadius;     // channel radius, used only with multi-channel emitters for matrix calculations, must be >= 0.0f when used
  255.     FLOAT32* pChannelAzimuths; // channel azimuth array, used only with multi-channel emitters for matrix calculations, contains positions of each channel expressed in radians along the channel radius with respect to the front orientation vector in the plane orthogonal to the top orientation vector, or X3DAUDIO_2PI to specify an LFE channel, must have at least ChannelCount elements, all within [0.0f, X3DAUDIO_2PI] when used
  256.  
  257.     X3DAUDIO_DISTANCE_CURVE* pVolumeCurve;    // volume level distance curve, used only for matrix calculations, NULL specifies a default curve that conforms to the inverse square law, calculated in user-defined world units with distances <= CurveDistanceScaler clamped to no attenuation
  258.     X3DAUDIO_DISTANCE_CURVE* pLFECurve;       // LFE level distance curve, used only for matrix calculations, NULL specifies a default curve that conforms to the inverse square law, calculated in user-defined world units with distances <= CurveDistanceScaler clamped to no attenuation
  259.     X3DAUDIO_DISTANCE_CURVE* pLPFDirectCurve; // LPF direct-path coefficient distance curve, used only for LPF direct-path calculations, NULL specifies the default curve: [0.0f,1.0f], [1.0f,0.75f]
  260.     X3DAUDIO_DISTANCE_CURVE* pLPFReverbCurve; // LPF reverb-path coefficient distance curve, used only for LPF reverb-path calculations, NULL specifies the default curve: [0.0f,0.75f], [1.0f,0.75f]
  261.     X3DAUDIO_DISTANCE_CURVE* pReverbCurve;    // reverb send level distance curve, used only for reverb calculations, NULL specifies the default curve: [0.0f,1.0f], [1.0f,0.0f]
  262.  
  263.     FLOAT32 CurveDistanceScaler; // curve distance scaler, used to scale normalized distance curves to user-defined world units and/or exaggerate their effect, used only for matrix, LPF (both direct and reverb paths), and reverb calculations, must be within [FLT_MIN, FLT_MAX] when used
  264.     FLOAT32 DopplerScaler;       // doppler shift scaler, used to exaggerate doppler shift effect, used only for doppler calculations, must be within [0.0f, FLT_MAX] when used
  265. } X3DAUDIO_EMITTER, *LPX3DAUDIO_EMITTER;
  266.  
  267.  
  268. // DSP settings:
  269. // Receives results from a call to X3DAudioCalculate to be sent
  270. // to the low-level audio rendering API for 3D signal processing.
  271. //
  272. // The user is responsible for allocating the matrix coefficient table,
  273. // delay time array, and initializing the channel counts when used.
  274. typedef struct X3DAUDIO_DSP_SETTINGS
  275. {
  276.     FLOAT32* pMatrixCoefficients; // [inout] matrix coefficient table, receives an array representing the volume level used to send from source channel S to destination channel D, stored as pMatrixCoefficients[SrcChannelCount * D + S], must have at least SrcChannelCount*DstChannelCount elements
  277.     FLOAT32* pDelayTimes;         // [inout] delay time array, receives delays for each destination channel in milliseconds, must have at least DstChannelCount elements (stereo final mix only)
  278.     UINT32 SrcChannelCount;       // [in] number of source channels, must equal number of channels in respective emitter
  279.     UINT32 DstChannelCount;       // [in] number of destination channels, must equal number of channels of the final mix
  280.  
  281.     FLOAT32 LPFDirectCoefficient; // [out] LPF direct-path coefficient
  282.     FLOAT32 LPFReverbCoefficient; // [out] LPF reverb-path coefficient
  283.     FLOAT32 ReverbLevel; // [out] reverb send level
  284.     FLOAT32 DopplerFactor; // [out] doppler shift factor, scales resampler ratio for doppler shift effect, where the effective frequency = DopplerFactor * original frequency
  285.     FLOAT32 EmitterToListenerAngle; // [out] emitter-to-listener interior angle, expressed in radians with respect to the emitter's front orientation
  286.  
  287.     FLOAT32 EmitterToListenerDistance; // [out] distance in user-defined world units from the emitter base to listener position, always calculated
  288.     FLOAT32 EmitterVelocityComponent; // [out] component of emitter velocity vector projected onto emitter->listener vector in user-defined world units/second, calculated only for doppler
  289.     FLOAT32 ListenerVelocityComponent; // [out] component of listener velocity vector projected onto emitter->listener vector in user-defined world units/second, calculated only for doppler
  290. } X3DAUDIO_DSP_SETTINGS, *LPX3DAUDIO_DSP_SETTINGS;
  291.  
  292.  
  293. //--------------<M-A-C-R-O-S>-----------------------------------------------//
  294. // function storage-class attribute and calltype
  295. #if defined(_XBOX) || defined(X3DAUDIOSTATIC)
  296.     #define X3DAUDIO_API_(type) EXTERN_C type STDAPIVCALLTYPE
  297. #else
  298.     #if defined(X3DEXPORT)
  299.         #define X3DAUDIO_API_(type) EXTERN_C __declspec(dllexport) type STDAPIVCALLTYPE
  300.     #else
  301.         #define X3DAUDIO_API_(type) EXTERN_C __declspec(dllimport) type STDAPIVCALLTYPE
  302.     #endif
  303. #endif
  304. #define X3DAUDIO_IMP_(type) type STDMETHODVCALLTYPE
  305.  
  306.  
  307. //--------------<F-U-N-C-T-I-O-N-S>-----------------------------------------//
  308. // initializes instance handle
  309. X3DAUDIO_API_(void) X3DAudioInitialize (UINT32 SpeakerChannelMask, FLOAT32 SpeedOfSound, __out X3DAUDIO_HANDLE Instance);
  310.  
  311. // calculates DSP settings with respect to 3D parameters
  312. X3DAUDIO_API_(void) X3DAudioCalculate (__in const X3DAUDIO_HANDLE Instance, __in const X3DAUDIO_LISTENER* pListener, __in const X3DAUDIO_EMITTER* pEmitter, UINT32 Flags, __inout X3DAUDIO_DSP_SETTINGS* pDSPSettings);
  313.  
  314.  
  315. #pragma pack(pop) // revert packing alignment
  316. //---------------------------------<-EOF->----------------------------------//
  317.