30 #ifndef _SoundManager_H__ 31 #define _SoundManager_H__ 70 virtual void preUpdate(
const Clock& time)
override;
72 void setConfigValues();
79 {
return index < this->deviceNames_.size() ? this->deviceNames_[index] :
std::string(); }
82 void setListenerPosition(
const Vector3& position);
83 void setListenerOrientation(
const Quaternion& orientation);
98 std::shared_ptr<SoundBuffer> getSoundBuffer(
const std::string& filename);
99 void releaseSoundBuffer(
const std::shared_ptr<SoundBuffer>& buffer,
bool bPoolBuffer);
107 void processCrossFading(
float dt);
111 void checkFadeStepValidity();
119 unsigned int createSoundSources(
unsigned int n);
139 static const unsigned int maxEffectsPoolSize_s = 40 * 1024 * 1024;
SoundBufferMap soundBuffers_
Definition: SoundManager.h:144
ALCdevice * device_
Definition: SoundManager.h:123
std::vector< ALuint > availableSoundSources_
Definition: SoundManager.h:149
struct ALCdevice_struct ALCdevice
Definition: OrxonoxPrereqs.h:221
void source(const std::string &filename)
Reads the content of a file and executes the commands in it line by line.
Definition: ConsoleCommandCompilation.cc:167
void checkSoundVolumeValidity()
Definition: SoundManager.h:114
unsigned int minSources_
Definition: SoundManager.h:147
void error(const std::string &text)
Prints output with error level.
Definition: ConsoleCommandCompilation.cc:145
::std::string string
Definition: gtest-port.h:756
Inherit from UpdateListener if you need to receive calls before or after the game is ticked...
Definition: UpdateListener.h:52
virtual void postUpdate(const Clock &time) override
Gets called by Core after the framework was ticked (but before graphics are drawn).
Definition: SoundManager.h:71
unsigned int effectsPoolSize_
Definition: SoundManager.h:140
std::list< StrongPtr< AmbientSound > > fadeOutList_
Definition: SoundManager.h:132
float crossFadeStep_
Absolute change per second (0.1 means 10% of the nominal volume) for cross fading.
Definition: SoundManager.h:130
AmbientList ambientSounds_
Definition: SoundManager.h:128
The BaseSound class is the base class for all sound file loader classes.
Definition: BaseSound.h:45
static SoundManager & getInstance()
Definition: SoundManager.h:75
Definition: SoundManager.h:54
int ALenum
Definition: OrxonoxPrereqs.h:224
This is the base class of all objects which may contain config values.
Definition: Configurable.h:47
The SoundManager class manages the OpenAL device, context and listener position.
Definition: SoundManager.h:60
std::list< StrongPtr< AmbientSound > > fadeInList_
Definition: SoundManager.h:131
Value
Definition: SoundManager.h:51
Base for singleton classes.
Definition: Singleton.h:114
static SoundManager * singletonPtr_s
Definition: SoundManager.h:154
std::vector< std::string > deviceNames_
Definition: SoundManager.h:122
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: SoundManager.h:53
std::list< std::shared_ptr< SoundBuffer > > EffectsPoolList
Definition: SoundManager.h:141
Shared library macros, enums, constants and forward declarations for the orxonox library ...
Declaration of Configurable, the base class of all objects which may contain config values...
void checkAmbientVolumeValidity()
Definition: SoundManager.h:115
std::list< std::pair< AmbientSound *, bool > > AmbientList
Definition: SoundManager.h:127
static bool exists()
Definition: SoundManager.h:76
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
bool bDestructorCalled_
Becomes true if the destructor is called - used to prevent ambient sounds from registering after the ...
Definition: SoundManager.h:152
EffectsPoolList effectsPool_
Definition: SoundManager.h:142
Definition of the Singleton template that is used as base class for classes that allow only one insta...
std::string getDeviceName(unsigned int index) const
Definition: SoundManager.h:78
The AmbientSound class is used to play background music.
Definition: AmbientSound.h:44
std::vector< std::pair< ALuint, BaseSound * > > usedSoundSources_
Definition: SoundManager.h:150
Simple real time clock based on Ogre::Timer.
Definition: Clock.h:57
void checkEffectsVolumeValidity()
Definition: SoundManager.h:116
static bool exists()
Tells whether the singleton has been created.
Definition: Singleton.h:125
Definition of StrongPtr<T>, wraps a pointer to an object and keeps it alive.
struct ALCcontext_struct ALCcontext
Definition: OrxonoxPrereqs.h:220
Definition: SoundManager.h:55
unsigned int ALuint
Definition: OrxonoxPrereqs.h:222
static T & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
std::map< std::string, std::shared_ptr< SoundBuffer > > SoundBufferMap
Definition: SoundManager.h:143
ALCcontext * context_
Definition: SoundManager.h:124
unsigned int maxSources_
Definition: SoundManager.h:148