Class SoundExtensions
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
SoundEffectThe sound effect to create an instance from
volume
floatThe value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Volume to. Defaults to 1.
pitch
floatThe value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Pitch to. Defaults to 0.
pan
floatThe value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.Pan to. Defaults to 0.
isLooped
boolThe value to set the returned instance's Microsoft.Xna.Framework.Audio.SoundEffectInstance.IsLooped to. Defaults to false.
Returns
- SoundEffectInstance