SoundEffect.Play3D Method (AudioListener , AudioEmitter, Single, Single, Boolean)
Returns a playing SoundEffectInstance at the specified positions using the specified values for volume, pitch, and looping.
Zune Specific Information |
---|
3D audio is not supported. All 3D audio effects are mapped to the volume and pan properties used by SoundEffectInstance Properties. |
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public SoundEffectInstance Play3D (
AudioListener[] listeners,
AudioEmitter emitter,
float volume,
float pitch,
bool loop
)
Parameters
- listeners
Positions of each listener. - emitter
Position of the emitter. - volume
Volume to use when begining playback. Ranging from 0.0f (silence) to 1.0f (full volume). 1.0f is full volume relative to SoundEffect.MasterVolume. - pitch
Pitch adjustment, ranging from -1.0f (down one octave) to 1.0f (up one octave). 0.0f is unity (normal) pitch. - loop
Whether to loop the sound indefinitely, until stopped by the application. Specify true to continuously loop the sound's loop region, or false to play the entire sound just once.
Return Value
A playing SoundEffectInstance at the specified positions using the specified values for volume, pitch, and looping.
Remarks
Use this method when there is more than one AudioListener listening. This can be useful for split screen games, for example, when there are two players in the game world at the same time.
See Also
Reference
SoundEffect Class
SoundEffect Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista, Zune