Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2009, 11:45:29 PM (15 years ago)
Author:
rgrieder
Message:

Converted SoundManager into a more suitable singleton.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/orxonox/sound/SoundManager.cc

    r3133 r3184  
    3838namespace orxonox
    3939{
     40    SoundManager* SoundManager::singletonRef_s = NULL;
    4041    ALCdevice* SoundManager::device_s = NULL;
    4142
     
    4546    SoundManager::SoundManager()
    4647    {
     48        assert(singletonRef_s == NULL);
     49        singletonRef_s = this;
     50
    4751        this->soundavailable_ = true;
    4852        if(!alutInitWithoutContext(NULL,NULL))
     
    9195    SoundManager::~SoundManager()
    9296    {
     97        assert(singletonRef_s != NULL);
     98        singletonRef_s = NULL;
     99
    93100        alcDestroyContext(this->context_);
    94101        alcCloseDevice(SoundManager::device_s);
Note: See TracChangeset for help on using the changeset viewer.