Export (0) Print
Expand All

SoundEffect Constructor (Byte[], Int32, AudioChannels)

Initializes a new instance of SoundEffect based on an audio buffer, sample rate, and number of audio channels.

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

public SoundEffect(
	byte[] buffer,
	int sampleRate,
	AudioChannels channels
)

Parameters

buffer
Type: System.Byte[]
Buffer that contains the audio data. The audio format must be PCM wave data.
sampleRate
Type: System.Int32
Sample rate, in Hertz (Hz), of audio data.
channels
Type: Microsoft.Xna.Framework.Audio.AudioChannels
Number of channels (mono or stereo) of audio data.

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