diff --git a/include/SFML/Audio/SoundSource.hpp b/include/SFML/Audio/SoundSource.hpp index edcaaa29..fc71859d 100644 --- a/include/SFML/Audio/SoundSource.hpp +++ b/include/SFML/Audio/SoundSource.hpp @@ -250,6 +250,49 @@ public: //////////////////////////////////////////////////////////// SoundSource& operator =(const SoundSource& right); + //////////////////////////////////////////////////////////// + /// \brief Start or resume playing the sound source + /// + /// This function starts the source if it was stopped, resumes + /// it if it was paused, and restarts it from the beginning if + /// it was already playing. + /// + /// \see pause, stop + /// + //////////////////////////////////////////////////////////// + virtual void play() = 0; + + //////////////////////////////////////////////////////////// + /// \brief Pause the sound source + /// + /// This function pauses the source if it was playing, + /// otherwise (source already paused or stopped) it has no effect. + /// + /// \see play, stop + /// + //////////////////////////////////////////////////////////// + virtual void pause() = 0; + + //////////////////////////////////////////////////////////// + /// \brief Stop playing the sound source + /// + /// This function stops the source if it was playing or paused, + /// and does nothing if it was already stopped. + /// It also resets the playing position (unlike pause()). + /// + /// \see play, pause + /// + //////////////////////////////////////////////////////////// + virtual void stop() = 0; + + //////////////////////////////////////////////////////////// + /// \brief Get the current status of the sound (stopped, paused, playing) + /// + /// \return Current status of the sound + /// + //////////////////////////////////////////////////////////// + virtual Status getStatus() const; + protected: //////////////////////////////////////////////////////////// @@ -260,14 +303,6 @@ protected: //////////////////////////////////////////////////////////// SoundSource(); - //////////////////////////////////////////////////////////// - /// \brief Get the current status of the sound (stopped, paused, playing) - /// - /// \return Current status of the sound - /// - //////////////////////////////////////////////////////////// - Status getStatus() const; - //////////////////////////////////////////////////////////// // Member data ////////////////////////////////////////////////////////////