fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / audio / sound_manager.hpp
index a715d99..657ca06 100644 (file)
@@ -66,7 +66,7 @@ public:
   void play_music(const std::string& filename, bool fade = false);
   void stop_music(float fadetime = 0);
 
-  bool is_music_enabled() { return music_enabled; } 
+  bool is_music_enabled() { return music_enabled; }
   bool is_sound_enabled() { return sound_enabled; }
 
   bool is_audio_enabled() {
@@ -75,6 +75,15 @@ public:
 
   void update();
 
+  /*
+   * Tell soundmanager to call update() for stream_sound_source.
+   */
+  void register_for_update( StreamSoundSource* sss );
+  /*
+   * Unsubscribe from updates for stream_sound_source.
+   */
+  void remove_from_update( StreamSoundSource* sss );
+
 private:
   friend class OpenALSoundSource;
   friend class StreamSoundSource;
@@ -95,6 +104,9 @@ private:
   typedef std::vector<OpenALSoundSource*> SoundSources;
   SoundSources sources;
 
+  typedef std::vector<StreamSoundSource*> StreamSoundSources;
+  StreamSoundSources update_list;
+
   StreamSoundSource* music_source;
 
   bool music_enabled;
@@ -104,4 +116,3 @@ private:
 extern SoundManager* sound_manager;
 
 #endif
-