Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2982 for code


Ignore:
Timestamp:
May 18, 2009, 3:38:22 PM (16 years ago)
Author:
erwin
Message:

added some error checking

Location:
code/branches/sound/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sound/src/orxonox/objects/items/Engine.cc

    r2980 r2982  
    7878                delete this->boostBlur_;
    7979        }
     80
     81        if(this->sound_ != NULL)
     82            delete this->sound_;
    8083    }
    8184
     
    222225    {
    223226        this->ship_ = ship;
    224         this->sound_->attachToEntity(ship);
     227
     228        if(this->sound_ != NULL)
     229            this->sound_->attachToEntity(ship);
    225230
    226231        if (ship)
  • code/branches/sound/src/orxonox/sound/SoundManager.cc

    r2980 r2982  
    6464            else
    6565            {
    66                 COUT(3) << "OpenAL: Sound device opened";
     66                COUT(3) << "OpenAL: Sound device opened" << std::endl;
    6767                this->context_ = alcCreateContext(SoundManager::device_s, NULL);
    6868                if(this->context_ == NULL)
    6969                {
    70                     COUT(2) << "OpenAL: Could not create sound context";
     70                    COUT(2) << "OpenAL: Could not create sound context" << std::endl;
    7171                }
    7272                else
    7373                {
    74                     COUT(3) << "OpenAL: Context " << this->context_ << "loaded";
    75                     alcMakeContextCurrent(this->context_);
     74                    if(alcMakeContextCurrent(this->context_) == AL_TRUE)
     75                        COUT(3) << "OpenAL: Context " << this->context_ << "loaded" << std::endl;
    7676                }
    7777            }
Note: See TracChangeset for help on using the changeset viewer.