SoundEffect Members

The following tables list the members exposed by the SoundEffect type.

Public Constructors

Name Description
Public Method SoundEffect Overloaded. Initializes a new instance of SoundEffect, which provides the ability to load audio data for sound effects.

Public Properties

Name Description
Public Property Static DistanceScale Gets or sets a value that adjusts the effect of distance calculations on the sound (emitter).
Public Property Static DopplerScale Gets or sets a value that adjusts the effect of doppler calculations on the sound (emitter).
Public Property Duration Gets the duration of the SoundEffect.
Public Property IsDisposed Gets a value that indicates whether the object is disposed.
Public Property Static MasterVolume Gets or sets the master volume that affects all SoundEffectInstance sounds.
Public Property Name Gets or sets the asset name of the SoundEffect.
Public Property Static SpeedOfSound Returns the speed of sound: 343.5 meters per second.

Public Methods

Name Description
Public Method CreateInstance Creates a new SoundEffectInstance for this SoundEffect.
Public Method Dispose Releases the resources used by the SoundEffect.
Public Method Equals (Inherited from Object.)
Public Method Static FromStream Creates a SoundEffect object based on the specified data stream.
Public Method GetHashCode (Inherited from Object.)
Public Method Static GetSampleDuration Returns the sample duration based on the specified sample size and sample rate.
Public Method Static GetSampleSizeInBytes Returns the size of the audio sample based on duration, sample rate, and audio channels.
Public Method GetType (Inherited from Object.)
Public Method Play Overloaded. Plays a sound.
Public Method ToString (Inherited from Object.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also


SoundEffect Class
Microsoft.Xna.Framework.Audio Namespace