C# Class fliXNA_xbox.FlxSound

Inheritance: FlxBasic
Show file Open project: konamicode/fliXNA_xbox Class Usage Examples

Public Properties

Property Type Description
amplitude float
amplitudeLeft float
amplitudeRight float
artist string
autoDestroy bool
name string
survive bool
x float
y float

Protected Properties

Property Type Description
_fadeInTimer float
_fadeInTotal float
_fadeOutTimer float
_fadeOutTotal float
_followTarget bool
_looped bool
_pan bool
_pauseOnFadeOut bool
_position float
_radius float
_sound Microsoft.Xna.Framework.Audio.SoundEffectInstance
_source FlxObject
_target FlxObject
_volume float
_volumeAdjust float
playCount int
proximitized bool

Public Methods

Method Description
FlxSound ( ) : System

FlxSound constructor gets all the variables initialized, but NOT ready to play a sound yet.

destroy ( ) : void
fadeIn ( float Seconds ) : void
fadeOut ( float Seconds, bool PauseInstead = false ) : void
getActualVolume ( ) : float
loadEmbedded ( SoundEffect EmbeddedSound, bool Looped = false, bool AutoDestroy = false ) : FlxSound
pause ( ) : void
play ( bool ForceRestart = false ) : void
proximity ( FlxObject Source, FlxObject Target, float Radius ) : FlxSound
resume ( ) : void
stop ( ) : void
update ( ) : void

Protected Methods

Method Description
createSound ( ) : void

Private Methods

Method Description
updateTransform ( ) : void

Method Details

FlxSound() public method

FlxSound constructor gets all the variables initialized, but NOT ready to play a sound yet.
public FlxSound ( ) : System
return System

createSound() protected method

protected createSound ( ) : void
return void

destroy() public method

public destroy ( ) : void
return void

fadeIn() public method

public fadeIn ( float Seconds ) : void
Seconds float
return void

fadeOut() public method

public fadeOut ( float Seconds, bool PauseInstead = false ) : void
Seconds float
PauseInstead bool
return void

getActualVolume() public method

public getActualVolume ( ) : float
return float

loadEmbedded() public method

public loadEmbedded ( SoundEffect EmbeddedSound, bool Looped = false, bool AutoDestroy = false ) : FlxSound
EmbeddedSound Microsoft.Xna.Framework.Audio.SoundEffect
Looped bool
AutoDestroy bool
return FlxSound

pause() public method

public pause ( ) : void
return void

play() public method

public play ( bool ForceRestart = false ) : void
ForceRestart bool
return void

proximity() public method

public proximity ( FlxObject Source, FlxObject Target, float Radius ) : FlxSound
Source FlxObject
Target FlxObject
Radius float
return FlxSound

resume() public method

public resume ( ) : void
return void

stop() public method

public stop ( ) : void
return void

update() public method

public update ( ) : void
return void

Property Details

_fadeInTimer protected property

Internal timer for fading in the sound playback.
protected float _fadeInTimer
return float

_fadeInTotal protected property

Internal helper for fading in sounds.
protected float _fadeInTotal
return float

_fadeOutTimer protected property

Internal tracker used to keep track of requests to fade out the sound playback
protected float _fadeOutTimer
return float

_fadeOutTotal protected property

Internal helper for fading out sounds
protected float _fadeOutTotal
return float

_followTarget protected property

Internal helper for sound proximity. The sound will maintain the same position as the target if true.
protected bool _followTarget
return bool

_looped protected property

Internal tracker for whether the sound is looping or not
protected bool _looped
return bool

_pan protected property

Internal tracker for whether to pan the sound left and right. Defualt is false
protected bool _pan
return bool

_pauseOnFadeOut protected property

Internal flag for whether to pause or stop the sound when its done fading out
protected bool _pauseOnFadeOut
return bool

_position protected property

Internal tracker for the position in runtime of the sound playback
protected float _position
return float

_radius protected property

Internal tracker for maximum effective radius of this sound.
protected float _radius
return float

_sound protected property

Internal tracker for the sound object
protected SoundEffectInstance,Microsoft.Xna.Framework.Audio _sound
return Microsoft.Xna.Framework.Audio.SoundEffectInstance

_source protected property

Internal tracker for sound's source - for proximity and panning
protected FlxObject,fliXNA_xbox _source
return FlxObject

_target protected property

Internal tracker for sound's target - for proximity and panning
protected FlxObject,fliXNA_xbox _target
return FlxObject

_volume protected property

Internal tracker for the volume of the sound
protected float _volume
return float

_volumeAdjust protected property

Internal tracker for total volume adjustment
protected float _volumeAdjust
return float

amplitude public property

Stores the average wave amplitude of both stereo channels
public float amplitude
return float

amplitudeLeft public property

Amplitude of left stereo channel
public float amplitudeLeft
return float

amplitudeRight public property

Amplitude of right stereo channel
public float amplitudeRight
return float

artist public property

public string artist
return string

autoDestroy public property

Whether to call destroy() when the sound has finished
public bool autoDestroy
return bool

name public property

public string name
return string

playCount protected property

protected int playCount
return int

proximitized protected property

Internal tracker to help with proximity
protected bool proximitized
return bool

survive public property

Whether or not this sound should be automatically destroyed when you switch states
public bool survive
return bool

x public property

X position of this sound in world coordinates. Only matters if you're doing proximity/panning
public float x
return float

y public property

Y position of this sound in world coordinates. Only matters if you're doing proximity/panning
public float y
return float