Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Calling this method automatically sets the speaker mix for any sound played by this cue to a value calculated by the difference in Position values between listener and emitter. In preparation for the mix, the sound is converted to monoaural. Any stereo information in the sound is discarded.
Calling this method sets the cue-instance variables Distance, DopplerPitchScalar, and OrientationAngle to the resulting values of the 3D calculation between listener and emitter. These values do not modify sound attenuation over distance, or pitch shifting using Doppler values, on their own. You must set up a Runtime Parameter Curve (RPC) that defines how to map the cue-instance variable values to pitch and volume shifts, and associate sounds to these curves in the Microsoft Cross-Platform Audio Creation Tool (XACT). For information on doing so, see Applying 3D Audio Effects (XACT).
// Get the cue and play it. // For 3D cues, you must call Apply3D before calling Play. cue = soundBank.GetCue("buzz"); cue.Apply3D(listener, emitter); cue.Play();