Otter  0.9.88
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Music Class Reference

Class used to load and play music files. Music is streamed from the file source, or an IO stream. More...

Inherits IDisposable.

Public Member Functions

 Music (string source, bool loop=true)
 Load a music file from a file path. More...
 
 Music (Stream stream)
 Load a music stream from an IO stream. More...
 
void Play ()
 Play the music. More...
 
void Stop ()
 Stop the music! More...
 
void Pause ()
 Pause the music. More...
 
void Dispose ()
 Dispose the music. (I don't think this works right now.) More...
 

Properties

static float GlobalVolume [get, set]
 The global volume to play all music at. More...
 
float Volume [get, set]
 The local volume to play this music at. More...
 
float Pitch [get, set]
 Adjust the pitch of the music. Default value is 1. More...
 
int Offset [get, set]
 Set the playback offset of the music in milliseconds. More...
 
bool Loop [get, set]
 Determines if the music should loop or not. More...
 
int Duration [get]
 The duration in milliseconds of the music. More...
 
bool IsPlaying [get]
 Check if the Music is currently playing. More...
 

Detailed Description

Class used to load and play music files. Music is streamed from the file source, or an IO stream.

Constructor & Destructor Documentation

Otter.Music.Music ( string  source,
bool  loop = true 
)

Load a music file from a file path.

Parameters
source
Otter.Music.Music ( Stream  stream)

Load a music stream from an IO stream.

Parameters
stream

Member Function Documentation

void Otter.Music.Dispose ( )

Dispose the music. (I don't think this works right now.)

void Otter.Music.Pause ( )

Pause the music.

void Otter.Music.Play ( )

Play the music.

void Otter.Music.Stop ( )

Stop the music!

Property Documentation

int Otter.Music.Duration
get

The duration in milliseconds of the music.

float Otter.Music.GlobalVolume
staticgetset

The global volume to play all music at.

bool Otter.Music.IsPlaying
get

Check if the Music is currently playing.

bool Otter.Music.Loop
getset

Determines if the music should loop or not.

int Otter.Music.Offset
getset

Set the playback offset of the music in milliseconds.

float Otter.Music.Pitch
getset

Adjust the pitch of the music. Default value is 1.

float Otter.Music.Volume
getset

The local volume to play this music at.


The documentation for this class was generated from the following file: