C# Class Zeplin.Sound

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

Public Methods

Method 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 method

Pauses the sound.
public Pause ( ) : void
return void

Play() public method

Plays this sound unless it is already playing.
public Play ( ) : void
return void

Play() public method

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.
return void

PlayWithoutChecking() public method

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
return void

Sound() public method

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

Stop() public method

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.
return void