SoundEffectInstance Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Provides a single playing, paused, or stopped instance of a SoundEffect sound.

Inheritance Hierarchy

System.Object
  Microsoft.Xna.Framework.Audio.SoundEffectInstance

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

Syntax

'Declaration
Public Class SoundEffectInstance
public class SoundEffectInstance

The SoundEffectInstance type exposes the following members.

Properties

  Name Description
Public property IsDisposed Gets a value that indicates whether the object is disposed.
Public property IsLooped Gets a value that indicates whether looping is enabled for the SoundEffectInstance.
Public property Pan Gets or sets the panning for the SoundEffectInstance.
Public property Pitch Gets or sets the pitch adjustment for the SoundEffectInstance.
Public property State Gets the current state (playing, paused, or stopped) of the SoundEffectInstance.
Public property Volume Gets or sets the volume of the SoundEffectInstance.

Top

Methods

  Name Description
Public method Dispose() Releases unmanaged resources held by this SoundEffectInstance.
Protected method Dispose(Boolean) Releases the unmanaged resources held by this SoundEffectInstance, and optionally releases the managed resources.
Public method Pause Pauses the SoundEffectInstance.
Public method Play Plays or resumes playing the SoundEffectInstance.
Public method Resume Resumes playback of the SoundEffectInstance.
Public method Stop() Immediately stops playing the SoundEffectInstance.
Public method Stop(Boolean) Stops playing a SoundEffectInstance immediately or as authored.

Top

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.