Export (0) Print
Expand All

SoundEffect.GetSampleSizeInBytes Method

Returns the size of the audio sample based on duration, sample rate, and audio channels.

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

public static int GetSampleSizeInBytes(
	TimeSpan duration,
	int sampleRate,
	AudioChannels channels
)

Parameters

duration
Type: System.TimeSpan
The sample duration.
sampleRate
Type: System.Int32
Sample rate, in Hertz (Hz), of audio content. The sampleRate parameter must be between 8,000 Hz and 48,000 Hz.
channels
Type: Microsoft.Xna.Framework.Audio.AudioChannels
Number of channels in the audio data.

Return Value

Type: System.Int32
Size, in bytes, of audio sample.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft