C# Class Category5.SoundClip

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

Méthodes publiques

Méthode 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 méthode

public FadeIn ( System.TimeSpan fadeDuration ) : void
fadeDuration System.TimeSpan
Résultat void

FadeOut() public méthode

public FadeOut ( System.TimeSpan fadeDuration ) : void
fadeDuration System.TimeSpan
Résultat void

Load() public méthode

public Load ( String filename ) : void
filename String
Résultat void

Pause() public méthode

public Pause ( ) : void
Résultat void

Play() public méthode

public Play ( float volume, bool loopPlayback ) : void
volume float
loopPlayback bool
Résultat void

PlayFadeIn() public méthode

public PlayFadeIn ( float volume, System.TimeSpan fadeDuration, bool loopPlayback ) : void
volume float
fadeDuration System.TimeSpan
loopPlayback bool
Résultat void

Resume() public méthode

public Resume ( ) : void
Résultat void

SoundClip() public méthode

public SoundClip ( Microsoft.Xna.Framework.Content.ContentManager Content, String filename ) : System
Content Microsoft.Xna.Framework.Content.ContentManager
filename String
Résultat System

SoundClip() public méthode

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

Stop() public méthode

public Stop ( ) : void
Résultat void

Update() public méthode

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
Résultat void