C# Class SFML.Audio.Music

Music defines a big sound played using streaming, so usually what we call a music :)
Inheritance: SFML.System.ObjectBase
Afficher le fichier Open project: SFML/SFML.Net Class Usage Examples

Méthodes publiques

Méthode Description
Music ( Stream stream ) : System

Constructs a music from a custom stream

Music ( byte bytes ) : System

Constructs a music from an audio file in memory

Music ( string filename ) : System

Constructs a music from an audio file

Pause ( ) : void

Pause the audio stream. This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.

Play ( ) : void

Start or resume playing the audio stream. This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from beginning if it was it already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.

Stop ( ) : void

Stop playing the audio stream. This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike Pause()).

ToString ( ) : string

Provide a string describing the object

Méthodes protégées

Méthode Description
Destroy ( bool disposing ) : void

Handle the destruction of the object

Private Methods

Méthode Description
sfMusic_createFromFile ( string Filename ) : IntPtr
sfMusic_createFromMemory ( IntPtr data, ulong size ) : IntPtr
sfMusic_createFromStream ( IntPtr stream ) : IntPtr
sfMusic_destroy ( IntPtr MusicStream ) : void
sfMusic_getAttenuation ( IntPtr Music ) : float
sfMusic_getChannelCount ( IntPtr Music ) : uint
sfMusic_getDuration ( IntPtr Music ) : Time
sfMusic_getLoop ( IntPtr Music ) : bool
sfMusic_getMinDistance ( IntPtr Music ) : float
sfMusic_getPitch ( IntPtr Music ) : float
sfMusic_getPlayingOffset ( IntPtr Music ) : Time
sfMusic_getPosition ( IntPtr Music ) : Vector3f
sfMusic_getSampleRate ( IntPtr Music ) : uint
sfMusic_getStatus ( IntPtr Music ) : SoundStatus
sfMusic_getVolume ( IntPtr Music ) : float
sfMusic_isRelativeToListener ( IntPtr Music ) : bool
sfMusic_pause ( IntPtr Music ) : void
sfMusic_play ( IntPtr Music ) : void
sfMusic_setAttenuation ( IntPtr Music, float Attenuation ) : void
sfMusic_setLoop ( IntPtr Music, bool Loop ) : void
sfMusic_setMinDistance ( IntPtr Music, float MinDistance ) : void
sfMusic_setPitch ( IntPtr Music, float Pitch ) : void
sfMusic_setPlayingOffset ( IntPtr Music, Time TimeOffset ) : void
sfMusic_setPosition ( IntPtr Music, Vector3f position ) : void
sfMusic_setRelativeToListener ( IntPtr Music, bool Relative ) : void
sfMusic_setVolume ( IntPtr Music, float Volume ) : void
sfMusic_stop ( IntPtr Music ) : void

Method Details

Destroy() protected méthode

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
Résultat void

Music() public méthode

Constructs a music from a custom stream
public Music ( Stream stream ) : System
stream Stream Source stream to read from
Résultat System

Music() public méthode

Constructs a music from an audio file in memory
public Music ( byte bytes ) : System
bytes byte Byte array containing the file contents
Résultat System

Music() public méthode

Constructs a music from an audio file
public Music ( string filename ) : System
filename string Path of the music file to open
Résultat System

Pause() public méthode

Pause the audio stream. This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.
public Pause ( ) : void
Résultat void

Play() public méthode

Start or resume playing the audio stream. This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from beginning if it was it already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.
public Play ( ) : void
Résultat void

Stop() public méthode

Stop playing the audio stream. This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike Pause()).
public Stop ( ) : void
Résultat void

ToString() public méthode

Provide a string describing the object
public ToString ( ) : string
Résultat string