Changeset 6435 for code/branches
- Timestamp:
- Jan 1, 2010, 6:43:54 PM (15 years ago)
- Location:
- code/branches/sound4/src/orxonox/sound
- Files:
-
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound4/src/orxonox/sound/AmbientSound.h
r6417 r6435 31 31 #define _AmbientSound_H__ 32 32 33 #include " OrxonoxPrereqs.h"33 #include "sound/SoundPrereqs.h" 34 34 35 35 #include "core/BaseObject.h" -
code/branches/sound4/src/orxonox/sound/BaseSound.cc
r6417 r6435 91 91 alSourcePlay(this->audioSource_); 92 92 if (int error = alGetError()) 93 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;93 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl; 94 94 } 95 95 } … … 141 141 alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0); 142 142 if (ALint error = alGetError()) 143 COUT(2) << "Sound Warning: Setting source parameters to 0 failed: " 144 << SoundManager::getALErrorString(error) << std::endl; 143 COUT(2) << "Sound Warning: Setting source parameters to 0 failed: " << getALErrorString(error) << std::endl; 145 144 assert(this->soundBuffer_ != NULL); 146 145 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 147 146 if (ALuint error = alGetError()) 148 COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl;147 COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << getALErrorString(error) << std::endl; 149 148 } 150 149 … … 164 163 alSourcef(this->audioSource_, AL_GAIN, volume); 165 164 if (int error = alGetError()) 166 COUT(2) << "Sound: Error setting volume to " << volume 167 << ": " << SoundManager::getALErrorString(error) << std::endl; 165 COUT(2) << "Sound: Error setting volume to " << volume << ": " << getALErrorString(error) << std::endl; 168 166 } 169 167 } … … 189 187 alSourcef(this->audioSource_, AL_PITCH, pitch); 190 188 if (int error = alGetError()) 191 COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl;189 COUT(2) << "Sound: Error setting pitch: " << getALErrorString(error) << std::endl; 192 190 } 193 191 } … … 234 232 if (ALuint error = alGetError()) 235 233 { 236 COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl;234 COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << getALErrorString(error) << std::endl; 237 235 return; 238 236 } … … 242 240 alSourcePlay(this->audioSource_); 243 241 if (int error = alGetError()) 244 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;242 COUT(2) << "Sound: Error playing sound: " << getALErrorString(error) << std::endl; 245 243 if (this->isPaused()) 246 244 alSourcePause(this->audioSource_); -
code/branches/sound4/src/orxonox/sound/BaseSound.h
r6417 r6435 30 30 #define _BaseSound_H__ 31 31 32 #include " OrxonoxPrereqs.h"32 #include "sound/SoundPrereqs.h" 33 33 34 34 #include <string> -
code/branches/sound4/src/orxonox/sound/SoundBuffer.h
r6417 r6435 30 30 #define _SoundBuffer_H__ 31 31 32 #include " OrxonoxPrereqs.h"32 #include "sound/SoundPrereqs.h" 33 33 34 34 #include <list> -
code/branches/sound4/src/orxonox/sound/SoundManager.cc
r6417 r6435 52 52 ManageScopedSingleton(SoundManager, ScopeID::Graphics, true); 53 53 54 std::string SoundManager::getALErrorString(ALenum code) 54 // From SoundPrereqs.h 55 std::string getALErrorString(ALenum code) 55 56 { 56 57 switch (code) -
code/branches/sound4/src/orxonox/sound/SoundManager.h
r6417 r6435 31 31 #define _SoundManager_H__ 32 32 33 #include " OrxonoxPrereqs.h"33 #include "sound/SoundPrereqs.h" 34 34 35 35 #include <list> … … 99 99 void releaseSoundSource(ALuint source); 100 100 101 static std::string getALErrorString(ALenum error);102 103 101 private: 104 102 void processCrossFading(float dt); -
code/branches/sound4/src/orxonox/sound/SoundPrereqs.h
r6434 r6435 30 30 @file 31 31 @brief 32 Shared library macros, enums, constants and forward declarations for the orxonox library32 Enums, constants, functions and forward declarations for the sound files. 33 33 */ 34 34 35 #ifndef _ OrxonoxPrereqs_H__36 #define _ OrxonoxPrereqs_H__35 #ifndef _SoundPrereqs_H__ 36 #define _SoundPrereqs_H__ 37 37 38 #include "OrxonoxConfig.h" 39 #include "tools/ToolsPrereqs.h" 40 41 //----------------------------------------------------------------------- 42 // Shared library settings 43 //----------------------------------------------------------------------- 44 45 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD) 46 # ifdef ORXONOX_SHARED_BUILD 47 # define _OrxonoxExport __declspec(dllexport) 48 # else 49 # if defined( __MINGW32__ ) 50 # define _OrxonoxExport 51 # else 52 # define _OrxonoxExport __declspec(dllimport) 53 # endif 54 # endif 55 #elif defined ( ORXONOX_GCC_VISIBILITY ) 56 # define _OrxonoxExport __attribute__ ((visibility("default"))) 57 #else 58 # define _OrxonoxExport 59 #endif 38 #include "OrxonoxPrereqs.h" 60 39 61 40 //----------------------------------------------------------------------- … … 65 44 namespace orxonox 66 45 { 67 class CameraManager;68 class Level;69 class LevelManager;70 class PawnManager;71 class PlayerManager;72 class Radar;73 class Scene;74 75 // collisionshapes76 class CollisionShape;77 class CompoundCollisionShape;78 class WorldEntityCollisionShape;79 80 // controllers81 class AIController;82 class ArtificialController;83 class Controller;84 class HumanController;85 class ScriptController;86 class WaypointController;87 class WaypointPatrolController;88 89 // gametypes90 class Asteroids;91 class Deathmatch;92 class Gametype;93 class TeamBaseMatch;94 class TeamDeathmatch;95 class UnderAttack;96 97 // graphics98 class Backlight;99 class Billboard;100 class BlinkingBillboard;101 class Camera;102 class FadingBillboard;103 class GlobalShader;104 class Light;105 class Model;106 class ParticleEmitter;107 class ParticleSpawner;108 109 // infos110 class Bot;111 class GametypeInfo;112 class HumanPlayer;113 class Info;114 class PlayerInfo;115 116 // interfaces117 class GametypeMessageListener;118 class NotificationListener;119 class PlayerTrigger;120 class RadarListener;121 class RadarViewable;122 class Rewardable;123 class TeamColourable;124 125 // items126 class Engine;127 class Item;128 class MultiStateEngine;129 130 // overlays131 class InGameConsole;132 class Map;133 class OrxonoxOverlay;134 class OverlayGroup;135 136 // pickup137 class BaseItem;138 class DroppedItem;139 class EquipmentItem;140 class ModifierPickup;141 class PassiveItem;142 class PickupCollection;143 class PickupInventory;144 class PickupSpawner;145 class UsableItem;146 // pickup, items147 class HealthImmediate;148 class HealthUsable;149 class Jump;150 151 //sound152 46 class AmbientSound; 153 47 class BaseSound; … … 156 50 class SoundStreamer; 157 51 class WorldSound; 158 159 // weaponsystem160 class DefaultWeaponmodeLink;161 class Munition;162 class Weapon;163 class WeaponMode;164 class WeaponPack;165 class WeaponSet;166 class WeaponSlot;167 class WeaponSystem;168 169 // worldentities170 class BigExplosion;171 class CameraPosition;172 class ControllableEntity;173 class EffectContainer;174 class ExplosionChunk;175 class MobileEntity;176 class MovableEntity;177 class SpawnPoint;178 class StaticEntity;179 class TeamSpawnPoint;180 class WorldEntity;181 class Rocket;182 // worldentities, pawns183 class Destroyer;184 class Pawn;185 class SpaceShip;186 class Spectator;187 class TeamBaseMatchBase;188 52 } 189 53 190 // Bullet Physics Engine191 class btTransform;192 class btVector3;193 194 class btRigidBody;195 class btCollisionObject;196 class btGhostObject;197 class btManifoldPoint;198 199 class btCollisionShape;200 class btSphereShape;201 class btCompoundShape;202 class btStaticPlaneShape;203 204 class btDiscreteDynamicsWorld;205 class bt32BitAxisSweep3;206 class btDefaultCollisionConfiguration;207 class btCollisionDispatcher;208 class btSequentialImpulseConstraintSolver;209 210 // ALUT211 54 typedef struct ALCcontext_struct ALCcontext; 212 55 typedef struct ALCdevice_struct ALCdevice; … … 215 58 typedef int ALenum; 216 59 217 #endif /* _OrxonoxPrereqs_H__ */ 60 //----------------------------------------------------------------------- 61 // Helper functions 62 //----------------------------------------------------------------------- 63 64 namespace orxonox 65 { 66 //! Returns an error string for an AL error code 67 _OrxonoxExport std::string getALErrorString(ALenum error); 68 } 69 70 #endif /* _SoundPrereqs_H__ */ -
code/branches/sound4/src/orxonox/sound/SoundStreamer.cc
r6417 r6435 91 91 alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &processed); 92 92 if (ALint error = alGetError()) 93 COUT(2) << "Sound Warning: Couldn't get number of processed buffers: " 94 << SoundManager::getALErrorString(error) << std::endl; 93 COUT(2) << "Sound Warning: Couldn't get number of processed buffers: " << getALErrorString(error) << std::endl; 95 94 96 95 if(processed > 0) … … 99 98 alSourceUnqueueBuffers(audioSource, processed, buffers); 100 99 if (ALint error = alGetError()) 101 COUT(2) << "Sound Warning: Couldn't unqueue buffers: " 102 << SoundManager::getALErrorString(error) << std::endl; 100 COUT(2) << "Sound Warning: Couldn't unqueue buffers: " << getALErrorString(error) << std::endl; 103 101 104 102 for(int i = 0; i < processed; i++) … … 121 119 alSourceQueueBuffers(audioSource, processed, buffers); 122 120 if (ALint error = alGetError()) 123 COUT(2) << "Sound Warning: Couldn't queue buffers: " 124 << SoundManager::getALErrorString(error) << std::endl; 121 COUT(2) << "Sound Warning: Couldn't queue buffers: " << getALErrorString(error) << std::endl; 125 122 } 126 123 } -
code/branches/sound4/src/orxonox/sound/SoundStreamer.h
r6417 r6435 29 29 #define _SoundStreamer_H__ 30 30 31 #include " OrxonoxPrereqs.h"31 #include "sound/SoundPrereqs.h" 32 32 33 33 #include <string> -
code/branches/sound4/src/orxonox/sound/WorldSound.h
r6417 r6435 30 30 #define _WorldSound_H__ 31 31 32 #include " OrxonoxPrereqs.h"32 #include "sound/SoundPrereqs.h" 33 33 34 34 #include "tools/interfaces/Tickable.h"
Note: See TracChangeset
for help on using the changeset viewer.