Microphone.GetSampleDuration Method

Returns the duration of audio playback based on the size of the buffer.

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

Syntax

public TimeSpan GetSampleDuration (
         int sizeInBytes
)

Parameters

  • sizeInBytes
    Size, in bytes, of the audio data.

Return Value

TimeSpan object that represents the duration of the audio playback.

Remarks

sizeInBytes must satisfy format alignment restrictions.

See Also

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

Platforms

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