Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2009, 3:30:34 PM (15 years ago)
Author:
erwin
Message:

Sound: implemented sample file loading via alut

File:
1 edited

Legend:

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

    r2931 r2932  
    2727 */
    2828
    29 #include <OgreSceneNode.h>
     29#include <AL/alut.h>
    3030
    3131#include "orxonox/CameraManager.h"
     
    5757    SoundManager::SoundManager()
    5858    {
    59         // OpenAL device and context creation
    60         this->device_ = alcOpenDevice(NULL); // we operate on the default sound device
    61         if(this->device_)
    62             COUT(2) << "OpenAL: Could not create sound device, there will be no sound!" << std::endl;
    63 
    64         this->context_ = alcCreateContext(this->device_, NULL);
    65         alcMakeContextCurrent(this->context_);
    66         ALenum error = alcGetError(this->device_);
    67         if(error != ALC_NO_ERROR)
    68             COUT(2) << "OpenAL: Could not create sound context." << std::endl;
    69 
     59        if(!alutInit(NULL,NULL)) {
     60            COUT(2) << "OpenAL ALUT: " << alutGetErrorString(alutGetError());
     61        }
    7062    }
    7163
Note: See TracChangeset for help on using the changeset viewer.