Provides a loaded sound resource. You can play multiple instances of the SoundEffect by calling Play.
Assembly: Microsoft.Xna.Framework (in Microsoft.Xna.Framework.dll)
'Declaration Public NotInheritable Class SoundEffect
public sealed class SoundEffect
The SoundEffect type exposes the following members.
|SoundEffect(array<Byte, Int32, AudioChannels)||Initializes a new instance of SoundEffect based on an audio buffer, sample rate, and number of audio channels.|
|SoundEffect(array<Byte, Int32, Int32, Int32, AudioChannels, Int32, Int32)||Initializes a new instance of SoundEffect with specified parameters such as audio sample rate, channels, looping criteria, and a buffer to hold the audio.|
|Duration||Gets the length of time of the SoundEffect.|
|IsDisposed||Gets a value that indicates whether the object is disposed.|
|MasterVolume||Gets or sets the master volume that affects all SoundEffectInstance sounds.|
|CreateInstance||Creates a new SoundEffectInstance for this SoundEffect.|
|Dispose||Releases the resources used by the SoundEffect.|
|FromStream||Creates a SoundEffect object based on the specified data stream.|
|GetSampleDuration||Returns the sample duration based on the specified sample size and sample rate.|
|GetSampleSizeInBytes||Returns the size of the audio sample based on duration, sample rate, and audio channels.|
|Play()||Plays a sound.|
|Play(Single, Single, Single)||Plays a sound based on specified volume, pitch, and panning.|
Supported in: 5
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.