Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7256 in orxonox.OLD for trunk/src/lib/sound


Ignore:
Timestamp:
Mar 30, 2006, 11:45:31 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the preferences back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/preferences . -r7233:HEAD
no conflicts… nice work

Location:
trunk/src/lib/sound
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/sound_engine.cc

    r7225 r7256  
    2626#include "util/loading/resource_manager.h"
    2727#include "debug.h"
    28 #include "parser/ini_parser/ini_parser.h"
     28#include "util/preferences.h"
    2929#include "globals.h"
    3030
     
    9595/**
    9696 * loads the settings of the SoundEngine from an ini-file
    97  * @param iniParser the IniParser of the inifile
    9897 */
    99 void SoundEngine::loadSettings(IniParser* iniParser)
    100 {
    101   MultiType channels = iniParser->getVar(CONFIG_NAME_AUDIO_CHANNELS, CONFIG_SECTION_AUDIO, "32");
     98void SoundEngine::loadSettings()
     99{
     100  MultiType channels = Preferences::getInstance()->getString(CONFIG_SECTION_AUDIO, CONFIG_NAME_AUDIO_CHANNELS, "32");
    102101  this->maxSourceCount = channels.getInt();
    103102
    104   MultiType effectsVolume = iniParser->getVar(CONFIG_NAME_EFFECTS_VOLUME, CONFIG_SECTION_AUDIO, "80");
     103  MultiType effectsVolume = Preferences::getInstance()->getString(CONFIG_SECTION_AUDIO, CONFIG_NAME_EFFECTS_VOLUME, "80");
    105104  this->effectsVolume = effectsVolume.getFloat()/100.0;
    106105
    107   MultiType musicVolume = iniParser->getVar(CONFIG_NAME_MUSIC_VOLUME, CONFIG_SECTION_AUDIO, "75");
     106  MultiType musicVolume = Preferences::getInstance()->getString(CONFIG_SECTION_AUDIO, CONFIG_NAME_MUSIC_VOLUME, "75");
    108107  this->musicVolume = musicVolume.getFloat()/100.0;
    109108}
  • trunk/src/lib/sound/sound_engine.h

    r7225 r7256  
    3131    inline static SoundEngine* getInstance() { if (!SoundEngine::singletonRef) SoundEngine::singletonRef = new SoundEngine();  return SoundEngine::singletonRef; };
    3232
    33     void loadSettings(IniParser* iniParser);
     33    void loadSettings();
    3434
    3535    SoundSource* createSource(const std::string& fileName, PNode* sourceNode = NULL);
Note: See TracChangeset for help on using the changeset viewer.