Changeset 4985 in orxonox.OLD for orxonox/trunk/src/lib/sound/sound_engine.cc
- Timestamp:
- Aug 12, 2005, 12:55:21 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/sound/sound_engine.cc
r4984 r4985 28 28 #include "resource_manager.h" 29 29 #include "debug.h" 30 #include "ini_parser.h" 30 31 31 32 using namespace std; 32 33 33 34 34 ////////////////// … … 110 110 alSourcei (this->sourceID, AL_BUFFER, this->buffer->getID()); 111 111 alSourcef (this->sourceID, AL_PITCH, 1.0 ); 112 alSourcef (this->sourceID, AL_GAIN, 1.0);112 alSourcef (this->sourceID, AL_GAIN, SoundEngine::getInstance()->getEffectsVolume() ); 113 113 alSourcei (sourceID, AL_LOOPING, AL_FALSE ); 114 114 } … … 239 239 alutExit(); 240 240 } 241 242 /** 243 * loads the settings of the SoundEngine from an ini-file 244 * @param iniParser the IniParser of the inifile 245 */ 246 void SoundEngine::loadSettings(IniParser* iniParser) 247 { 248 const char* musicVolume = iniParser->getVar(CONFIG_NAME_MUSIC_VOLUME, CONFIG_SECTION_AUDIO, "80"); 249 this->musicVolume = atof(musicVolume)/100.0; 250 251 const char* effectsVolume = iniParser->getVar(CONFIG_NAME_EFFECTS_VOLUME, CONFIG_SECTION_AUDIO, "80"); 252 this->effectsVolume = atof(effectsVolume)/100.0; 253 } 254 255 241 256 242 257 /**
Note: See TracChangeset
for help on using the changeset viewer.