Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3133 for code/branches/pch


Ignore:
Timestamp:
Jun 9, 2009, 10:06:57 PM (15 years ago)
Author:
rgrieder
Message:

Reduced header file dependencies in the sound classes.

Location:
code/branches/pch/src/orxonox/sound
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/orxonox/sound/SoundBase.cc

    r3108 r3133  
    2626 *
    2727 */
     28
     29#include "SoundBase.h"
     30
    2831#include <vector>
    2932#include <AL/alut.h>
    3033#include <vorbis/vorbisfile.h>
    31 
     34#include <boost/static_assert.hpp>
     35
     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"
     40
     41// Make sure we correctly avoid including al.h in the header
     42BOOST_STATIC_ASSERT(sizeof(uint32_t) == sizeof(ALuint));
     43BOOST_STATIC_ASSERT(sizeof(int32_t)  == sizeof(ALint));
    3744
    3845namespace orxonox
  • code/branches/pch/src/orxonox/sound/SoundBase.h

    r3078 r3133  
    2626 *
    2727 */
    28 #ifndef _SOUNDBASE_H__
    29 #define _SOUNDBASE_H__
    30 
    31 #include <AL/al.h>
    32 #include <string>
     28#ifndef _SoundBase_H__
     29#define _SoundBase_H__
    3330
    3431#include "OrxonoxPrereqs.h"
     32#include <string>
    3533
    3634namespace orxonox
     
    6058
    6159    private:
    62         ALuint loadOggFile(std::string filename);
    63         ALuint source_;
    64         ALuint buffer_;
     60        uint32_t loadOggFile(std::string filename);
     61        uint32_t source_;
     62        uint32_t buffer_;
    6563        WorldEntity* entity_;
    6664
    67         ALint getSourceState();
     65        int32_t getSourceState();
    6866
    6967        static SoundManager* soundmanager_s;
     
    7169} // namepsace orxonox
    7270
    73 #endif // _SOUNDBASE_H__
     71#endif /* _SoundBase_H__ */
  • code/branches/pch/src/orxonox/sound/SoundMainMenu.cc

    r3078 r3133  
    2828
    2929#include "SoundMainMenu.h"
     30
    3031#include "core/CoreIncludes.h"
    3132#include "core/ConfigValueIncludes.h"
  • code/branches/pch/src/orxonox/sound/SoundMainMenu.h

    r3078 r3133  
    2727 */
    2828
    29 #ifndef _SOUNDMAINMENU_H__
    30 #define _SOUNDMAINMENU_H__
     29#ifndef _SoundMainMenu_H__
     30#define _SoundMainMenu_H__
     31
     32#include "OrxonoxPrereqs.h"
    3133
    3234#include <string>
    33 
    3435#include "core/OrxonoxClass.h"
    35 #include "OrxonoxPrereqs.h"
    3636#include "SoundBase.h"
    3737
     
    4848    };
    4949}
    50 #endif
     50
     51#endif /* _SoundMainMenu_H__ */
  • code/branches/pch/src/orxonox/sound/SoundManager.cc

    r3108 r3133  
    2727 */
    2828
     29#include "SoundManager.h"
     30
    2931#include <AL/alut.h>
    3032
     33#include "util/Math.h"
    3134#include "orxonox/CameraManager.h"
    3235#include "orxonox/objects/worldentities/Camera.h"
    33 #include "util/Math.h"
    3436#include "SoundBase.h"
    35 #include "SoundManager.h"
    3637
    3738namespace orxonox
  • code/branches/pch/src/orxonox/sound/SoundManager.h

    r3078 r3133  
    2525 *      ...
    2626 */
    27 #ifndef _SOUNDMANGER_H__
    28 #define _SOUNDMANGER_H__
    29 
    30 #include <AL/al.h>
    31 #include <AL/alc.h>
     27#ifndef _SoundManager_H__
     28#define _SoundManager_H__
    3229
    3330#include "OrxonoxPrereqs.h"
     31
     32#include <list>
    3433#include "orxonox/objects/Tickable.h"
     34
     35// forward declarations
     36typedef struct ALCcontext_struct ALCcontext;
     37typedef struct ALCdevice_struct ALCdevice;
    3538
    3639namespace orxonox
     
    4952        void addSound(SoundBase* sound);
    5053        void removeSound(SoundBase* sound);
    51         virtual void tick(float dt);
     54        void tick(float dt);
    5255        bool isSoundAvailable();
    5356
     
    6164} // namespace orxonox
    6265
    63 #endif // _SOUNDMANAGER_H__
     66#endif /* _SoundManager_H__ */
Note: See TracChangeset for help on using the changeset viewer.