Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 9:20:47 AM (15 years ago)
Author:
rgrieder
Message:

Merged pch branch back to trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/sound/SoundBase.cc

    r3108 r3196  
    2626 *
    2727 */
     28
     29#include "SoundBase.h"
     30
     31#include <string>
    2832#include <vector>
    2933#include <AL/alut.h>
    3034#include <vorbis/vorbisfile.h>
    3135
     36#include "util/Math.h"
     37#include "core/Core.h"
    3238#include "orxonox/objects/worldentities/WorldEntity.h"
    33 #include "util/Math.h"
    34 #include "SoundBase.h"
    3539#include "SoundManager.h"
    36 #include "core/Core.h"
    3740
    3841namespace orxonox
    3942{
    40     SoundManager* SoundBase::soundmanager_s = NULL;
    41 
    4243    SoundBase::SoundBase(WorldEntity* entity)
    4344    {
    44         if(SoundBase::soundmanager_s == NULL)
    45         {
    46             SoundBase::soundmanager_s = new SoundManager();
    47         }
    48 
    4945        this->source_ = 0;
    5046        this->buffer_ = 0;
    5147        this->entity_ = entity;
    5248
    53         SoundBase::soundmanager_s->addSound(this);
     49        SoundManager::getInstance().addSound(this);
    5450    }
    5551
     
    141137        filename = Core::getMediaPathString() + "/audio/" + filename;
    142138
    143         if(!SoundBase::soundmanager_s->isSoundAvailable())
     139        if(!SoundManager::getInstance().isSoundAvailable())
    144140        {
    145141            COUT(3) << "Sound: not available, skipping " << filename << std::endl;
     
    179175    }
    180176
    181     ALuint SoundBase::loadOggFile(std::string filename)
     177    ALuint SoundBase::loadOggFile(const std::string& filename)
    182178    {
    183179        char inbuffer[4096];
Note: See TracChangeset for help on using the changeset viewer.