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

Returns the size, in bytes, of a buffer of the specified duration, based on the settings of this instance.

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

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


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

Return Value

Type: System.Int32
The data size of the buffer, in bytes.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop