2010-10-18 00:40:50 +02:00
|
|
|
#ifndef _SOUNDGLOBAL_H
|
|
|
|
#define _SOUNDGLOBAL_H
|
|
|
|
|
|
|
|
namespace Engine {
|
|
|
|
|
|
|
|
void PlaySound (const std::string &sound_name);
|
2011-04-10 19:39:33 +02:00
|
|
|
/** \brief Plays a sound chunk in a loop
|
|
|
|
*
|
|
|
|
* \note Loops are hard-coded played in channel 4, therefore playing
|
|
|
|
* two loops simultaneously is currently not supported.
|
|
|
|
*/
|
2010-10-18 00:40:50 +02:00
|
|
|
void PlaySoundLoop (const std::string &sound_name, int count);
|
|
|
|
void HaltSoundLoop (const std::string &sound_name);
|
|
|
|
void PlayMusic (const std::string &music_name);
|
|
|
|
|
2011-03-24 08:26:06 +01:00
|
|
|
/** \brief Loads a sound effect for later use */
|
|
|
|
void LoadSound (const std::string &sound_name);
|
|
|
|
|
2010-11-22 20:00:44 +01:00
|
|
|
/** \brief Sets the volume of the music channel to the given value
|
|
|
|
*
|
|
|
|
* \param music_value is a value from 0. (no music) to 1. (maximum volume)
|
|
|
|
*/
|
|
|
|
void SetMusicVolume (const float &music_volume);
|
|
|
|
/** \brief Returns the value of the music (0. - 1.) */
|
|
|
|
float GetMusicVolume ();
|
|
|
|
/** \brief Sets the volume of the music channel to the given value
|
|
|
|
*
|
|
|
|
* \param music_value is a value from 0. (no music) to 1. (maximum volume)
|
|
|
|
*/
|
|
|
|
void SetEffectsVolume (const float &effects_volume);
|
|
|
|
/** \brief Returns the value of the effects (0. - 1.) */
|
|
|
|
float GetEffectsVolume ();
|
|
|
|
|
2010-10-18 00:40:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _SOUNDGLOBAL_H */
|