SoundEffect.FromStream Method (Microsoft.Xna.Framework.Audio)

Creates a new SoundEffect object based on the specified data stream.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public static SoundEffect FromStream(
	Stream stream
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

stream
Type: System.IO.Stream
A stream containing the wave data.

Return Value

Type: Microsoft.Xna.Framework.Audio.SoundEffect
A new SoundEffect object.
The stream must point to the head of a valid wave file in the RIFF bitstream format. The formats supported are: 8-bit unsigned PCM16-bit signed PCM24-bit signed PCM32-bit IEEE float PCMMS-ADPCM 4-bit compressedIMA/ADPCM (IMA4) 4-bit compressed
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web