VSGL2 - Very Simple Graphic Library 2  2.0
 All Classes Namespaces Files Functions Variables Macros Pages
Functions
vsgl2::audio Namespace Reference

Functions

void play_music (string music)
 Use to play a music in a loop (WAVE, MOD, MIDI, OGG, MP3, FLAC, and any file that you use a command to play with). It can be typically used to play a background music. More...
 
void pause_music ()
 Use to pause the music that is currently playing. More...
 
void stop_music ()
 Use to stop the music that is currently playing. More...
 
void play_sound (string sound)
 Use to play a sound (WAVE, MOD, MIDI, OGG, MP3, FLAC, and any file that you use a command to play with). It can be typically used to play a sound effect linked to an user action (pressing a button...). More...
 

Function Documentation

void pause_music ( )

Use to pause the music that is currently playing.

Warning
If a music is not currently playing, nothing happens.
void play_music ( string  music)

Use to play a music in a loop (WAVE, MOD, MIDI, OGG, MP3, FLAC, and any file that you use a command to play with). It can be typically used to play a background music.

Parameters
musicThe music name, either absolute or relative
Warning
The music will play in background until it will be paused or stopped
void play_sound ( string  sound)

Use to play a sound (WAVE, MOD, MIDI, OGG, MP3, FLAC, and any file that you use a command to play with). It can be typically used to play a sound effect linked to an user action (pressing a button...).

Parameters
soundThe sound name, either absolute or relative
Warning
The sound will play on its own channel, in this way it is possible to play multiple sounds at the same time, or the same sound overlapped.
Attention
Calling this function without leaving enough time between two calls, makes the second call useless.
void stop_music ( )

Use to stop the music that is currently playing.

Warning
If a music is not currently playing, nothing happens.