Table of Contents

Class SoundExtensions

Namespace
MLEM.Sound
Assembly
MLEM.dll

A set of extensions for dealing with Microsoft.Xna.Framework.Audio.SoundEffect and Microsoft.Xna.Framework.Audio.SoundEffectInstance

public static class SoundExtensions
Inheritance
SoundExtensions
Inherited Members

Methods

CreateInstance(SoundEffect, float, float, float, bool)

Creates a new Microsoft.Xna.Framework.Audio.SoundEffectInstance from the given Microsoft.Xna.Framework.Audio.SoundEffect, allowing optional instance data to be supplied as part of the method call

public static SoundEffectInstance CreateInstance(this SoundEffect effect, float volume = 1, float pitch = 0, float pan = 0, bool isLooped = false)

Parameters

effect SoundEffect

The sound effect to create an instance from

volume float

The value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Volume to. Defaults to 1.

pitch float

The value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Pitch to. Defaults to 0.

pan float

The value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Pan to. Defaults to 0.

isLooped bool

The value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.IsLooped to. Defaults to false.

Returns

SoundEffectInstance