|
Smolgui
Immediate gui library based on SFML
|
Allow to play spatialized sounds. More...
#include <SoundPlayer.h>
Public Member Functions | |
| SoundPlayer ()=default | |
| SoundPlayer (const SoundPlayer &)=delete | |
| SoundPlayer & | operator= (const SoundPlayer &)=delete |
| void | setResource (SoundHolder &holder) |
| set sounds files | |
| void | play (const std::string &sound, const sf::Vector2f &position={}) |
| play a sound at a given position | |
| void | removeStoppedSounds () |
| remove all stopped sounds | |
| sf::Vector3f | listenerPosition () const |
| get listener position | |
| void | setListenerPosition (const sf::Vector2f &position) |
| set listener position | |
| float | volume () const |
| get sound volume | |
| void | setVolume (const float volume) |
| set sound volume | |
Public Attributes | |
| float | attenuation = 0.f |
| float | minDistance = 100.f |
Allow to play spatialized sounds.
|
default |
SoundPlayer is not copyable
|
delete |
| sf::Vector3f sgui::SoundPlayer::listenerPosition | ( | ) | const |
get listener position
|
delete |
| void sgui::SoundPlayer::play | ( | const std::string & | sound, |
| const sf::Vector2f & | position = {} ) |
play a sound at a given position
| void sgui::SoundPlayer::removeStoppedSounds | ( | ) |
remove all stopped sounds
| void sgui::SoundPlayer::setListenerPosition | ( | const sf::Vector2f & | position | ) |
set listener position
| void sgui::SoundPlayer::setResource | ( | SoundHolder & | holder | ) |
set sounds files
| void sgui::SoundPlayer::setVolume | ( | const float | volume | ) |
set sound volume
| float sgui::SoundPlayer::volume | ( | ) | const |
get sound volume
| float sgui::SoundPlayer::attenuation = 0.f |
| float sgui::SoundPlayer::minDistance = 100.f |