C# Class Category5.SoundClip

A sound clip takes care of loading a particular clip into the audio library
Show file Open project: AnyKey/tojam4 Class Usage Examples

Public Methods

Method Description
FadeIn ( System.TimeSpan fadeDuration ) : void
FadeOut ( System.TimeSpan fadeDuration ) : void
Load ( String filename ) : void
Pause ( ) : void
Play ( float volume, bool loopPlayback ) : void
PlayFadeIn ( float volume, System.TimeSpan fadeDuration, bool loopPlayback ) : void
Resume ( ) : void
SoundClip ( Microsoft.Xna.Framework.Content.ContentManager Content, String filename ) : System
SoundClip ( Microsoft.Xna.Framework.Content.ContentManager Content, short index, String filename ) : System
Stop ( ) : void
Update ( ) : void

Must be updated in game loop, required for real time calculations in our case it's only used to fade in and out songs failure to call update results in songs playing at constant volume.

Method Details

FadeIn() public method

public FadeIn ( System.TimeSpan fadeDuration ) : void
fadeDuration System.TimeSpan
return void

FadeOut() public method

public FadeOut ( System.TimeSpan fadeDuration ) : void
fadeDuration System.TimeSpan
return void

Load() public method

public Load ( String filename ) : void
filename String
return void

Pause() public method

public Pause ( ) : void
return void

Play() public method

public Play ( float volume, bool loopPlayback ) : void
volume float
loopPlayback bool
return void

PlayFadeIn() public method

public PlayFadeIn ( float volume, System.TimeSpan fadeDuration, bool loopPlayback ) : void
volume float
fadeDuration System.TimeSpan
loopPlayback bool
return void

Resume() public method

public Resume ( ) : void
return void

SoundClip() public method

public SoundClip ( Microsoft.Xna.Framework.Content.ContentManager Content, String filename ) : System
Content Microsoft.Xna.Framework.Content.ContentManager
filename String
return System

SoundClip() public method

public SoundClip ( Microsoft.Xna.Framework.Content.ContentManager Content, short index, String filename ) : System
Content Microsoft.Xna.Framework.Content.ContentManager
index short
filename String
return System

Stop() public method

public Stop ( ) : void
return void

Update() public method

Must be updated in game loop, required for real time calculations in our case it's only used to fade in and out songs failure to call update results in songs playing at constant volume.
public Update ( ) : void
return void