Returns the sample duration based on the specified sample size and sample rate.
Assembly: Microsoft.Xna.Framework (in Microsoft.Xna.Framework.dll)
'Declaration Public Shared Function GetSampleDuration ( _ sizeInBytes As Integer, _ sampleRate As Integer, _ channels As AudioChannels _ ) As TimeSpan
public static TimeSpan GetSampleDuration( int sizeInBytes, int sampleRate, AudioChannels channels )
Size, in bytes, of audio data.
Sample rate, in Hertz (Hz), of audio content. The sampleRate must be between 8000 Hz and 48000 Hz.
Number of channels in the audio data.
The calculated sample duration.
Supported in: 5
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.