diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index 90e1bb1f..b1efb8f8 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -164,10 +164,10 @@ public: //////////////////////////////////////////////////////////// /// \brief Get the audio buffer attached to the sound /// - /// \return Sound buffer attached to the sound (can be a null pointer) + /// \return Sound buffer attached to the sound /// //////////////////////////////////////////////////////////// - const SoundBuffer* getBuffer() const; + const SoundBuffer& getBuffer() const; //////////////////////////////////////////////////////////// /// \brief Tell whether or not the sound is in loop mode diff --git a/src/SFML/Audio/Sound.cpp b/src/SFML/Audio/Sound.cpp index 4cd79413..b97d0ae4 100644 --- a/src/SFML/Audio/Sound.cpp +++ b/src/SFML/Audio/Sound.cpp @@ -110,9 +110,9 @@ void Sound::setPlayingOffset(Time timeOffset) //////////////////////////////////////////////////////////// -const SoundBuffer* Sound::getBuffer() const +const SoundBuffer& Sound::getBuffer() const { - return m_buffer; + return *m_buffer; }