SharpDX.X3DAudio The assembly provides managed X3DAudio API. ee415714 X3DAudio X3DAudio Defines a DSP setting at a given normalized distance. ee419056 X3DAUDIO_DISTANCE_CURVE X3DAUDIO_DISTANCE_CURVE
Normalized distance. This must be within 0.0f to 1.0f.
ee419056 X3DAUDIO_DISTANCE_CURVE_POINT* pPoints X3DAUDIO_DISTANCE_CURVE_POINT pPoints
DSP control setting.
ee419056 unsigned int PointCount unsigned int PointCount
No documentation. X3DAUDIO_EMITTER Defines a single-point or multiple-point 3D audio source that is used with an arbitrary number of sound channels.

only supports a cone in a single-point emitter. Multi-point emitters are a convenient and efficient way to manage a related group of sound sources. Many properties are shared among all channel points, such as Doppler?the same Doppler shift is applied to all channels in the emitter. Thus, the Doppler value need only be calculated once, not per-point as would be needed with multiple separate single-point emitters. Because only has one orientation vector, a multi-point emitter cone would be of limited usefulness, forcing all channels to behave as if they were facing the same direction. If multiple independent cones are needed, multiple single-point emitters should be used, each with its own orientation.

The parameter type X3DAUDIO_VECTOR is typed to DirectX::XMFLOAT3, to provide x , y , and z floating-point values.

X3DAudio uses a left-handed Cartesian coordinate system, with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction.

For user-defined distance curves, the distance field of the first point must be 0.0f and the distance field of the last point must be 1.0f.

If an emitter moves beyond a distance of (CurveDistanceScaler ? 1.0f), the last point on the curve is used to compute the volume output level. The last point is determined by the following:

.pPoints[PointCount-1].DSPSetting)
Inner Radius and Inner Radius Angle

InnerRadius is used to specify an area of smooth transition around the origin point as a sound travels directly through, above or below the listener. Elevation is accounted for by specifying an InnerRadiusAngle, whereby a sound whose elevation increases or decreases, will eventually start to bleed the sound into more than just two speakers.

When Inner Radius and Inner Radius Angle are not used, emitters are audible in the two closest speakers to their current position/orientation (or, if directly on a line with one speaker's defined angle, solely from that one speaker).

Inner Radius and Inner Radius Angle have no effect on emitters positioned outside of the cones they describe. Inside of the cone, they will gradually cause the sound to bleed into the opposite speakers, until the sound will be equally heard in all speakers when the emitter is at the same position as (or directly above or below) the listener.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_EMITTER X3DAUDIO_EMITTER
Reference to Cone data. X3DAUDIO_CONE* pCone disabled as it is not used
Pointer to a sound cone. Used only with single-channel emitters for matrix, LPF (both direct and reverb paths), and reverb calculations. null specifies the emitter is omnidirectional.
microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_CONE* pCone X3DAUDIO_CONE pCone
Orientation of the front direction. This value must be orthonormal with OrientTop. OrientFront must be normalized when used. For single-channel emitters without cones OrientFront is only used for emitter angle calculations. For multi channel emitters or single-channel with cones OrientFront is used for matrix, LPF (both direct and reverb paths), and reverb calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter D3DVECTOR OrientFront D3DVECTOR OrientFront
Orientation of the top direction. This value must be orthonormal with OrientFront. OrientTop is only used with multi-channel emitters for matrix calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter D3DVECTOR OrientTop D3DVECTOR OrientTop
Position in user-defined world units. This value does not affect Velocity.
microsoft.directx_sdk.x3daudio.x3daudio_emitter D3DVECTOR Position D3DVECTOR Position
Velocity vector in user-defined world units/second. This value is used only for doppler calculations. It does not affect Position.
microsoft.directx_sdk.x3daudio.x3daudio_emitter D3DVECTOR Velocity D3DVECTOR Velocity
Value to be used for the inner radius calculations. If InnerRadius is 0, then no inner radius is used, but InnerRadiusAngle may still be used. This value must be between 0.0f and MAX_FLT.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float InnerRadius float InnerRadius
Value to be used for the inner radius angle calculations. This value must be between 0.0f and X3DAUDIO_PI/4.0.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float InnerRadiusAngle float InnerRadiusAngle
Number of emitters defined by the structure. Must be greater than 0.
microsoft.directx_sdk.x3daudio.x3daudio_emitter unsigned int ChannelCount unsigned int ChannelCount
Distance from Position that channels will be placed if ChannelCount is greater than 1. ChannelRadius is only used with multi-channel emitters for matrix calculations. Must be greater than or equal to 0.0f.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float ChannelRadius float ChannelRadius
Table of channel positions, expressed as an azimuth in radians along the channel radius with respect to the front orientation vector in the plane orthogonal to the top orientation vector. An azimuth of X3DAUDIO_2PI specifies a channel is a low-frequency effects (LFE) channel. LFE channels are positioned at the emitter base and are calculated with respect to pLFECurve only, never pVolumeCurve. pChannelAzimuths must have at least ChannelCount elements. The table values must be within 0.0f to X3DAUDIO_2PI. pChannelAzimuths is used with multi-channel emitters for matrix calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float* pChannelAzimuths float pChannelAzimuths
Volume-level distance curve, which is used only for matrix calculations. null specifies a specialized default curve that conforms to the inverse square law, such that when distance is between 0.0f and CurveDistanceScaler ? 1.0f, no attenuation is applied.

When distance is greater than CurveDistanceScaler ? 1.0f, the amplification factor is (CurveDistanceScaler ? 1.0f)/distance. At a distance of CurveDistanceScaler ? 2.0f, the sound will be at half volume or -6 dB, at a distance of CurveDistanceScaler ? 4.0f, the sound will be at one quarter volume or -12 dB, and so on.

pVolumeCurve and pLFECurve are independent of each other. pVolumeCurve does not affect LFE channel volume.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pVolumeCurve X3DAUDIO_DISTANCE_CURVE pVolumeCurve
LFE roll-off distance curve, or null to use default curve: [0.0f, CurveDistanceScaler ?1.0f], [CurveDistanceScaler ?1.0f, 0.0f]. A null value for pLFECurve specifies a default curve that conforms to the inverse square law with distances <= CurveDistanceScaler clamped to no attenuation.

pVolumeCurve and pLFECurve are independent of each other. pLFECurve does not affect non LFE channel volume.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLFECurve X3DAUDIO_DISTANCE_CURVE pLFECurve
Low-pass filter (LPF) direct-path coefficient distance curve, or null to use the default curve: [0.0f, 1.0f], [1.0f, 0.75f]. pLPFDirectCurve is only used for LPF direct-path calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLPFDirectCurve X3DAUDIO_DISTANCE_CURVE pLPFDirectCurve
LPF reverb-path coefficient distance curve, or null to use default curve: [0.0f, 0.75f], [1.0f, 0.75f]. pLPFReverbCurve is only used for LPF reverb path calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLPFReverbCurve X3DAUDIO_DISTANCE_CURVE pLPFReverbCurve
Reverb send level distance curve, or null to use default curve: [0.0f, 1.0f], [1.0f, 0.0f].
microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pReverbCurve X3DAUDIO_DISTANCE_CURVE pReverbCurve
Curve distance scaler that is used to scale normalized distance curves to user-defined world units, and/or to exaggerate their effect. This does not affect any other calculations. The value must be within the range FLT_MIN to FLT_MAX. CurveDistanceScaler is only used for matrix, LPF (both direct and reverb paths), and reverb calculations.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float CurveDistanceScaler float CurveDistanceScaler
Doppler shift scaler that is used to exaggerate Doppler shift effect. DopplerScaler is only used for Doppler calculations and does not affect any other calculations. The value must be within the range 0.0f to FLT_MAX.
microsoft.directx_sdk.x3daudio.x3daudio_emitter float DopplerScaler float DopplerScaler
No documentation. X3DAUDIO_DSP_SETTINGS Receives the results from a call toX3DAudioCalculate.

The following members must be initialized before passing this structure to the function:

  • pMatrixCoefficients

  • pDelayTimes

  • SrcChannelCount

  • DstChannelCount

The following members are returned by passing this structure to the function:

  • pMatrixCoefficients

  • pDelayTimes

  • LPFDirectCoefficient

  • LPFReverbCoefficient

  • ReverbLevel

  • DopplerFactor

  • EmitterToListenerAngle

  • EmitterToListenerDistance

  • EmitterVelocityComponent

  • ListenerVelocityComponent

Note
For pMatrixCoefficients and pDelayTimes, does not allocate additional memory. merely modifies the values at the memory locations allocated for these references.
ee419057 X3DAUDIO_DSP_SETTINGS X3DAUDIO_DSP_SETTINGS
No documentation. float* pMatrixCoefficients float pMatrixCoefficients No documentation. float* pDelayTimes float pDelayTimes No documentation. unsigned int SrcChannelCount unsigned int SrcChannelCount No documentation. unsigned int DstChannelCount unsigned int DstChannelCount No documentation. float LPFDirectCoefficient float LPFDirectCoefficient No documentation. float LPFReverbCoefficient float LPFReverbCoefficient No documentation. float ReverbLevel float ReverbLevel No documentation. float DopplerFactor float DopplerFactor No documentation. float EmitterToListenerAngle float EmitterToListenerAngle No documentation. float EmitterToListenerDistance float EmitterToListenerDistance No documentation. float EmitterVelocityComponent float EmitterVelocityComponent No documentation. float ListenerVelocityComponent float ListenerVelocityComponent No documentation. X3DAudioCalculateFlags X3DAudioCalculateFlags No documentation. X3DAUDIO_CALCULATE_MATRIX X3DAUDIO_CALCULATE_MATRIX No documentation. X3DAUDIO_CALCULATE_DELAY X3DAUDIO_CALCULATE_DELAY No documentation. X3DAUDIO_CALCULATE_LPF_DIRECT X3DAUDIO_CALCULATE_LPF_DIRECT No documentation. X3DAUDIO_CALCULATE_LPF_REVERB X3DAUDIO_CALCULATE_LPF_REVERB No documentation. X3DAUDIO_CALCULATE_REVERB X3DAUDIO_CALCULATE_REVERB No documentation. X3DAUDIO_CALCULATE_DOPPLER X3DAUDIO_CALCULATE_DOPPLER No documentation. X3DAUDIO_CALCULATE_EMITTER_ANGLE X3DAUDIO_CALCULATE_EMITTER_ANGLE No documentation. X3DAUDIO_CALCULATE_ZEROCENTER X3DAUDIO_CALCULATE_ZEROCENTER No documentation. X3DAUDIO_CALCULATE_REDIRECT_TO_LFE X3DAUDIO_CALCULATE_REDIRECT_TO_LFE Functions Speed of sound in the air. Sets all global 3D audio constants.
[in] Assignment of channels to speaker positions. This value must not be zero. The only permissible value on Xbox 360 is SPEAKER_XBOX.
[in] Speed of sound, in user-defined world units per second. Use this value only for doppler calculations. It must be greater than or equal to FLT_MIN.
[out] 3D audio instance handle. Use this handle when you call .
microsoft.directx_sdk.x3daudio.x3daudioinitialize void X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize
Calculates DSP settings with respect to 3D parameters.
[in] 3D audio instance handle. Call to get this handle.
[in] Pointer to an representing the point of reception.
[in] Pointer to an representing the sound source.
[in] Flags used to control which DSP settings are calculated:
ValueDescription
Enables matrix coefficient table calculation.?
Enables delay time array calculation (stereo only).?
Enables low pass filter (LPF) direct-path coefficient calculation.?
Enables LPF reverb-path coefficient calculation.?
Enables reverb send level calculation.?
Enables Doppler shift factor calculation.?
Enables emitter-to-listener interior angle calculation.?
Fills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels, but the center channel will be silent. This flag is only valid if you also set .?
Applies an equal mix of all source channels to a low frequency effect (LFE) destination channel. It only applies to matrix calculations with a source that does not have an LFE channel and a destination that does have an LFE channel. This flag is only valid if you also set .?
[in, out] Pointer to an structure that receives the calculation results.
ee419052 void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[InOut] X3DAUDIO_DSP_SETTINGS* pDSPSettings) X3DAudioCalculate
Initializes a new instance of the class. The speakers config. Initializes a new instance of the class. The speakers config. The speed of sound. Calculates dsp settings for the specified listener and emitter. The listener. The emitter. The flags. The source channel count. The destination channel count. Dsp settings No documentation. X3DAUDIO_LISTENER Defines a point of 3D audio reception.

The parameter type X3DAUDIO_VECTOR is typed to DirectX::XMFLOAT3, to provide x, y and z floating-point values.

A listener's front and top vectors must be orthonormal. To be considered orthonormal, a pair of vectors must have a magnitude of 1 +- 1x10-5 and a dot product of 0 +- 1x10-5.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_LISTENER X3DAUDIO_LISTENER
Reference to Cone data. X3DAUDIO_CONE* pCone Disabled as it is not used
Orientation of front direction. When pCone is null OrientFront is used only for matrix and delay calculations. When pCone is not null OrientFront is used for matrix, LPF (both direct and reverb paths), and reverb calculations. This value must be orthonormal with OrientTop when used.
microsoft.directx_sdk.x3daudio.x3daudio_listener D3DVECTOR OrientFront D3DVECTOR OrientFront
Orientation of top direction, used only for matrix and delay calculations. This value must be orthonormal with OrientFront when used
microsoft.directx_sdk.x3daudio.x3daudio_listener D3DVECTOR OrientTop D3DVECTOR OrientTop
Position in user-defined world units. This value does not affect Velocity.
microsoft.directx_sdk.x3daudio.x3daudio_listener D3DVECTOR Position D3DVECTOR Position
Velocity vector in user-defined world units per second, used only for doppler calculations. This value does not affect Position.
microsoft.directx_sdk.x3daudio.x3daudio_listener D3DVECTOR Velocity D3DVECTOR Velocity
Pointer to an structure for this listener. Providing a listener cone will specify that additional calculations are performed when determining the volume and filter DSP parameters for individual sound sources. A null pCone value specifies an omnidirectional sound and no cone processing is applied. pCone is only used for matrix, LPF (both direct and reverb paths), and reverb calculations.
microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_CONE* pCone X3DAUDIO_CONE pCone
Specifies directionality for a single-channel non-LFE emitter by scaling DSP behavior with respect to the emitter's orientation.

For a detailed explanation of sound cones see Sound Cones.

ee419054 X3DAUDIO_CONE X3DAUDIO_CONE
Inner cone angle in radians. This value must be within 0.0f to X3DAUDIO_2PI.
ee419054 float InnerAngle float InnerAngle
Outer cone angle in radians. This value must be within InnerAngle to X3DAUDIO_2PI.
ee419054 float OuterAngle float OuterAngle
Volume scaler on/within inner cone. This value must be within 0.0f to 2.0f.
ee419054 float InnerVolume float InnerVolume
Volume scaler on/beyond outer cone. This value must be within 0.0f to 2.0f.
ee419054 float OuterVolume float OuterVolume
LPF direct-path or reverb-path coefficient scaler on/within inner cone. This value is only used for LPF calculations and must be within 0.0f to 1.0f.
ee419054 float InnerLPF float InnerLPF
LPF direct-path or reverb-path coefficient scaler on or beyond outer cone. This value is only used for LPF calculations and must be within 0.0f to 1.0f.
ee419054 float OuterLPF float OuterLPF
Reverb send level scaler on or within inner cone. This must be within 0.0f to 2.0f.
ee419054 float InnerReverb float InnerReverb
Reverb send level scaler on/beyond outer cone. This must be within 0.0f to 2.0f.
ee419054 float OuterReverb float OuterReverb
Defines a DSP setting at a given normalized distance. ee419056 X3DAUDIO_DISTANCE_CURVE_POINT X3DAUDIO_DISTANCE_CURVE_POINT
Normalized distance. This must be within 0.0f to 1.0f.
ee419056 float Distance float Distance
DSP control setting.
ee419056 float DSPSetting float DSPSetting
The namespace provides a managed X3DAudio API. ee415714 X3DAudio X3DAudio