Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 4, 2009, 3:40:08 PM (15 years ago)
Author:
erwin
Message:

ambient sound loading for levels

File:
1 edited

Legend:

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

    r2932 r2950  
    3838{
    3939    /**
    40      * Static function to get the singleton instance of SoundManager.
    41      *
    42      * @return The singleton instance
    43      */
    44     SoundManager* SoundManager::instance()
    45     {
    46         if(SoundManager::singleton_ == NULL)
    47         {
    48             SoundManager::singleton_ = new SoundManager();
    49         }
    50 
    51         return SoundManager::singleton_;
    52     }
    53 
    54     /**
    5540     * Default constructor
    5641     */
     
    5843    {
    5944        if(!alutInit(NULL,NULL)) {
    60             COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError());
     45            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError()) << std::endl;
    6146        }
     47
     48        COUT(4) << "OpenAL ALUT version:" << alutGetMajorVersion() << "." << alutGetMinorVersion() << std::endl;
     49        COUT(4) << "OpenAL ALUT supported MIME types:" << alutGetMIMETypes(ALUT_LOADER_BUFFER) << std::endl;
    6250    }
    6351
     
    9886        // update listener position
    9987        Camera* camera = CameraManager::getInstance().getActiveCamera();
     88        if(camera == NULL) return;
    10089        Vector3 pos = camera->getPosition();
    10190        alListener3f(AL_POSITION, pos.x, pos.y, pos.z);
Note: See TracChangeset for help on using the changeset viewer.