Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2009, 1:18:13 PM (16 years ago)
Author:
erwin
Message:

Sound: Added building things, corrected some typos

Location:
code/branches/sound/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sound/src/CMakeLists.txt

    r2724 r2930  
    141141ADD_SUBDIRECTORY(util)
    142142ADD_SUBDIRECTORY(core)
    143 #ADD_SUBDIRECTORY(audio)
     143ADD_SUBDIRECTORY(sound)
    144144ADD_SUBDIRECTORY(network)
    145145ADD_SUBDIRECTORY(orxonox)
  • code/branches/sound/src/sound/SoundBase.h

    r2899 r2930  
    2626 *
    2727 */
     28#ifndef _SOUNDBASE_H__
     29#define _SOUNDBASE_H__
    2830
    2931#include <al.h>
     
    6466    }; // class SoundBase
    6567} // namepsace orxonox
     68
     69#endif // _SOUNDBASE_H__
  • code/branches/sound/src/sound/SoundManager.cc

    r2899 r2930  
    3030
    3131#include "orxonox/CameraManager.h"
     32#include "orxonox/objects/worldentities/Camera.h"
     33#include "util/Math.h"
    3234#include "SoundManager.h"
    3335
     
    6163        this->context_ = alcCreateContext(this->device_, NULL);
    6264        alcMakeContextCurrent(this->context_);
    63         ALenum error = alcGetError();
     65        ALenum error = alcGetError(this->device_);
    6466        if(error != ALC_NO_ERROR)
    6567            COUT(2) << "OpenAL: Could not create sound context." << std::endl;
     
    112114        Quaternion orient = camera->getOrientation();
    113115        Vector3 up = orient.xAxis(); // just a wild guess
    114         Vecotr3 at = orient.zAxis();
     116        Vector3 at = orient.zAxis();
    115117
    116         float[3][2] orientation = { { at.x, at.y, at.z },
    117                                     { up.x, up.y, up.z } };
     118        ALfloat* orientation = { at.x, at.y, at.z,
     119                                 up.x, up.y, up.z };
    118120
    119121        alListenerfv(AL_POSITION, orientation);
     
    127129    }
    128130
    129 } // namespace orxonox
     131}  
  • code/branches/sound/src/sound/SoundManager.h

    r2899 r2930  
    2525 *      ...
    2626 */
     27#ifndef _SOUNDMANGER_H__
     28#define _SOUNDMANGER_H__
    2729
    2830#include <al.h>
    2931#include <alc.h>
    3032
    31 #include <Tickable.h>
     33#include <orxonox/objects/Tickable.h>
    3234
    33 class SoundBase;
     35namespace orxonox
     36{
     37    class SoundBase;
    3438
    35 namespace Orxonox
    36 {
    3739    /**
    3840     * The SoundManager class manages the OpenAL device, context and listener
     
    4143     *
    4244     */
    43     class SoundManager : public Tickable
     45    class SoundManager : public Tickable 
    4446    {
    4547    public:
     
    4951        void removeSound(SoundBase* sound);
    5052       
    51         void tick(float dt);
     53        virtual void tick(float dt);
    5254
    5355    private:
     
    6163
    6264    }; // class SoundManager
    63 } // namespace Orxonox
     65} // namespace orxonox
     66
     67#endif // _SOUNDMANAGER_H__
Note: See TracChangeset for help on using the changeset viewer.