Share via


DynamicSoundEffectInstance.GetSampleSizeInBytes Method

Returns the size of the audio buffer required to contain audio samples based on the specified duration.

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

Syntax

public int GetSampleSizeInBytes (
         TimeSpan duration
)

Parameters

  • duration
    TimeSpan object that contains the duration of the audio sample.

Return Value

Size, in bytes, of the audio buffer.

Exceptions

Exception type Condition
ObjectDisposedException The exception that is thrown if GetSampleSizeInBytes is called after DynamicSoundEffectInstance has been disposed.

See Also

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

Platforms

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