Sdílet prostřednictvím


SoundEffect.Play Method ()

Creates a new SoundEffectInstance and plays it.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public SoundEffectInstance Play ()

Return Value

A new, playing, SoundEffectInstance.

Remarks

The sound is played at the default volume (1.0f), centered, and at unity pitch. To play the sound using a different volume, panning, or pitch, use one of the other Play overloads.

See Also

Reference

SoundEffect Class
SoundEffect Members
Microsoft.Xna.Framework.Audio Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista, Zune