SoundEffect.Duration Property

Gets the duration of the SoundEffect.

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

Syntax

public TimeSpan Duration { get; }

Property Value

A TimeSpan that represents the duration of the SoundEffect.

Remarks

This is a read-only property. The sound duration is initialized from the sound file and cannot be changed. For information about authoring and adding sound files, see Adding a Sound File (XACT).

See Also

Reference

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

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone