Fix music not properly fading in again
[supertux.git] / src / audio / dummy_sound_source.cpp
index 979b740..97aec96 100644 (file)
 //  You should have received a copy of the GNU General Public License
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+#include "audio/dummy_sound_source.hpp"
+
+#include <memory>
+
 #include "audio/sound_source.hpp"
 
 class DummySoundSource : public SoundSource
@@ -44,6 +48,10 @@ public:
   {
   }
 
+  virtual void set_relative(bool )
+  {
+  }
+
   virtual void set_gain(float )
   {
   }
@@ -64,17 +72,17 @@ public:
   {
   }
 
-  virtual void set_rollof_factor(float )
-  {
-  }
-
 private:
   bool is_playing;
+
+private:
+  DummySoundSource(const DummySoundSource&) = delete;
+  DummySoundSource& operator=(const DummySoundSource&) = delete;
 };
 
-SoundSource* create_dummy_sound_source()
+std::unique_ptr<SoundSource> create_dummy_sound_source()
 {
-  return new DummySoundSource();
+  return std::unique_ptr<SoundSource>(new DummySoundSource);
 }
 
 /* EOF */