Changeset 7460 in orxonox.OLD for trunk/src/lib/sound/sound_engine.h
- Timestamp:
- May 1, 2006, 12:30:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/sound_engine.h
r7355 r7460 22 22 // FORWARD DECLARATION 23 23 class PNode; 24 class IniParser; 25 26 27 //! A class that handles audio via the openAudioLibrary 28 class SoundEngine : public BaseObject{24 namespace OrxSound 25 { 26 //! A class that handles audio via the openAudioLibrary 27 class SoundEngine : public BaseObject 28 { 29 29 public: 30 30 virtual ~SoundEngine(); … … 32 32 inline static SoundEngine* getInstance() { if (!SoundEngine::singletonRef) SoundEngine::singletonRef = new SoundEngine(); return SoundEngine::singletonRef; }; 33 33 34 SoundSource* createSource(const std::string& fileName, PNode* sourceNode = NULL); 34 35 void loadSettings(); 35 36 SoundSource* createSource(const std::string& fileName, PNode* sourceNode = NULL); 36 bool initAudio(); 37 37 38 38 /** @param listener the listener in the scene */ 39 void setListener(PNode* listener) { this->listener = listener; };39 void setListener(const PNode* listener) { this->listener = listener; }; 40 40 void setDopplerValues(ALfloat dopplerFactor, ALfloat dopplerVelocity); 41 41 42 42 43 … … 48 49 void update(); 49 50 50 // administrative51 // administrative 51 52 void popALSource(ALuint& source); 52 53 void pushALSource(ALuint& source); 53 54 54 55 bool initAudio(); 56 bool allocateSources(unsigned int count); 57 58 // error handling: 55 // error handling: 59 56 static bool checkError(const std::string& error, unsigned int line); 60 57 bool checkALCError(const std::string& error, unsigned int line); … … 64 61 private: 65 62 SoundEngine(); 63 bool allocateSources(unsigned int count); 66 64 67 65 void listDevices(); … … 75 73 float musicVolume; //!< the maximum volume of the music in % (0f,1f] 76 74 float effectsVolume; //!< the maximum volume of sound-effects in % (0f,1f] 77 PNode*listener; //!< The listener of the Scene75 const PNode* listener; //!< The listener of the Scene 78 76 79 77 const std::list<BaseObject*>* bufferList; //!< A list of buffers … … 84 82 85 83 SDL_mutex* sourceMutex; //!< A mutex so we can not harm the stack 86 }; 84 }; 85 } 87 86 88 87 #endif /* _SOUND_ENGINE_H */
Note: See TracChangeset
for help on using the changeset viewer.