Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2009, 8:31:23 PM (15 years ago)
Author:
erwin
Message:

fixed some bugs

File:
1 edited

Legend:

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

    r2984 r2998  
    4444    SoundManager::SoundManager()
    4545    {
     46        this->soundavailable_ = true;
    4647        if(!alutInitWithoutContext(NULL,NULL))
    4748        {
    4849            COUT(2) << "Sound: OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
     50            this->soundavailable_ = false;
    4951        }
    5052        else
     
    6163            {
    6264                COUT(2) << "Sound: OpenAL: Could not open sound device" << std::endl;
     65                this->soundavailable_ = false;
    6366            }
    6467            else
     
    6972                {
    7073                    COUT(2) << "Sound: OpenAL: Could not create sound context" << std::endl;
     74                    this->soundavailable_ = false;
    7175                }
    7276                else
     
    146150            (*i)->update();
    147151    }
     152   
     153    /**
     154    * Check if sound is available
     155    */
     156    bool SoundManager::isSoundAvailable()
     157    {
     158        return this->soundavailable_;
     159    }
    148160}
Note: See TracChangeset for help on using the changeset viewer.