Changeset 6069 for code/branches/sound3/src/orxonox/sound/SoundManager.h
- Timestamp:
- Nov 15, 2009, 3:43:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound3/src/orxonox/sound/SoundManager.h
r6046 r6069 22 22 * Author: 23 23 * Erwin 'vaiursch' Herrsche 24 * Kevin Young 24 25 * Co-authors: 25 26 * ... 26 27 */ 28 27 29 #ifndef _SoundManager_H__ 28 30 #define _SoundManager_H__ … … 30 32 #include "OrxonoxPrereqs.h" 31 33 32 #include <cassert>33 34 #include <list> 35 #include <string> 34 36 #include "util/Singleton.h" 35 #include "tools/interfaces/Tickable.h"36 37 37 38 namespace orxonox … … 45 46 { 46 47 friend class Singleton<SoundManager>; 48 47 49 public: 48 50 SoundManager(); 49 51 ~SoundManager(); 50 52 51 void update(const Clock &time);52 void setConfigValues( void);53 void update(const Clock& time); 54 void setConfigValues(); 53 55 54 56 void setListenerPosition(const Vector3& position); … … 56 58 57 59 void registerAmbientSound(AmbientSound* newAmbient); 58 void unregisterAmbientSound(AmbientSound* currentAmbient); 59 const std::string& getAmbientPath(const std::string& source); 60 void fadeInAmbientSound(float dt); 61 void fadeOutAmbientSound(float dt); 62 void checkFadeStepValidity(void); 60 void unregisterAmbientSound(AmbientSound* oldAmbient); 61 void pauseAmbientSound(AmbientSound* ambient); 62 std::string getAmbientPath(const std::string& source); 63 63 64 64 private: 65 void processCrossFading(float dt); 66 void fadeIn(AmbientSound* sound); 67 void fadeOut(AmbientSound* sound); 68 69 void checkFadeStepValidity(); 70 65 71 ALCdevice* device_; 66 72 ALCcontext* context_; 67 73 68 std::list<AmbientSound*> ambientSounds_; 74 typedef std::list<std::pair<AmbientSound*, bool> > AmbientList; 75 AmbientList ambientSounds_; 69 76 70 float fadeStep_; //per second71 std::list< std::pair<AmbientSound*, float>> fadeInList_;72 std::list< std::pair<AmbientSound*, float>> fadeOutList_;77 float crossFadeStep_; //!< Absolute change per second (0.1 means 10% of the nominal volume) for cross fading 78 std::list<AmbientSound*> fadeInList_; 79 std::list<AmbientSound*> fadeOutList_; 73 80 74 std::string lastReqPath_;75 76 81 static SoundManager* singletonPtr_s; 77 82 };
Note: See TracChangeset
for help on using the changeset viewer.