Skip to content

Commit

Permalink
update to v1.1
Browse files Browse the repository at this point in the history
added ability to get a direct reference to a soundbuffer stored in the
sound system control.
  • Loading branch information
Hapaxia committed Jul 2, 2017
1 parent ed343fd commit 41dfca8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SfmlSoundSystem/Control.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
namespace sfmlSoundSystem
{

// SSS (SFML Sound System) v1.0 - Control
// SSS (SFML Sound System) v1.1 - Control
class Control
{
public:
Expand All @@ -66,6 +66,7 @@ class Control
void stopFx();
void stopMusic();
void stopAll();
sf::SoundBuffer& getBuffer(const std::string& soundId);
std::string getCurrentMusic() const;
sf::SoundSource::Status getCurrentMusicStatus() const;
unsigned int getNumberOfSoundsPlaying() const;
Expand Down Expand Up @@ -96,6 +97,11 @@ class Control
void priv_startSound(sf::Sound& voice, const sf::SoundBuffer& buffer, const sf::Vector3f& positionOffset = { 0.f, 0.f, 0.f }, float volume = 1.f);
};

inline sf::SoundBuffer& Control::getBuffer(const std::string& soundId)
{
return m_buffers[soundId];
}

inline std::string Control::getCurrentMusic() const
{
return m_currentMusic;
Expand Down

0 comments on commit 41dfca8

Please sign in to comment.