DynamicSoundEffectInstance.GetSampleDuration Method (Microsoft.Xna.Framework.Audio)

Returns the duration of an audio buffer of the specified size, based on the settings of this instance.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public TimeSpan GetSampleDuration(
	int sizeInBytes

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: System.Int32
Size of the buffer, in bytes.

Return Value

Type: System.TimeSpan
The playback length of the buffer.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop