C# Class Zeplin.Sound

Very basic wrapper for XNA's sound library.
Does not support any type besides SoundEffect right now.
Afficher le fichier Open project: zumpiez/Zeplin

Méthodes publiques

Méthode Description
Pause ( ) : void

Pauses the sound.

Play ( ) : void

Plays this sound unless it is already playing.

Play ( float volume, float pitch, float pan, bool loop ) : void

Plays this sound unless it is already playing.

PlayWithoutChecking ( ) : void

Plays this sound even if it is already playing.

A sound played in this way cannot be paused or stopped or otherwise manipulated.

Sound ( string resourceName ) : System

Constructs a Sound object from the specified resource string

Stop ( bool immediate ) : void

Stops the sound.

Method Details

Pause() public méthode

Pauses the sound.
public Pause ( ) : void
Résultat void

Play() public méthode

Plays this sound unless it is already playing.
public Play ( ) : void
Résultat void

Play() public méthode

Plays this sound unless it is already playing.
public Play ( float volume, float pitch, float pan, bool loop ) : void
volume float The volume of the sound. Valid values are between 0.0 (silent) and 1.0 (full).
pitch float Pitch adjustment, ranging from -1.0 (one octave down) to 1.0 (one octave up). 0.0 is
pan float Panning, ranging from -1.0 (full left) to 1.0 (full right). 0.0 is centered.
loop bool Whether to continue playing the song indefinitely, until stopped or paused manually, or set to no longer loop.
Résultat void

PlayWithoutChecking() public méthode

Plays this sound even if it is already playing.
A sound played in this way cannot be paused or stopped or otherwise manipulated.
public PlayWithoutChecking ( ) : void
Résultat void

Sound() public méthode

Constructs a Sound object from the specified resource string
public Sound ( string resourceName ) : System
resourceName string The name of a SoundEffect resource
Résultat System

Stop() public méthode

Stops the sound.
public Stop ( bool immediate ) : void
immediate bool Specifies whether to stop playing immediately, or to continue playing until the end of the sound.
Résultat void