Changeset 458
- Timestamp:
- Dec 11, 2007, 11:29:16 PM (17 years ago)
- Location:
- code/branches/FICN/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/audio/AudioManager.cc
r430 r458 7 7 AudioManager::AudioManager() 8 8 { 9 9 ambientPath = "audio/ambient"; 10 10 11 alutInit(NULL, 0); 12 13 14 11 alutInit(NULL, 0); 15 12 16 13 17 14 } 18 15 19 16 AudioManager::~AudioManager() 20 17 { 21 18 for (unsigned int i=0;i<=bgSounds.size();i++) 22 19 { 23 bgSounds[i].release(); 20 bgSounds[i].release(); 24 21 } 25 22 alutExit(); … … 46 43 { 47 44 std::cout << "Stopped playing background sound"<<std::endl; 48 } 45 } 49 46 50 47 void AudioManager::ambientAdd(std::string file) 51 48 { 52 std::string path = ambientPath + "/" + file + ".ogg"; 49 std::string path = ambientPath + "/" + file + ".ogg"; 53 50 AudioStream tmp(path); 54 51 tmp.open(); 55 52 if (tmp.isLoaded()) 56 53 { 57 bgSounds.push_back(tmp); 54 bgSounds.push_back(tmp); 58 55 std::cout << "Added background sound "<<file<<std::endl; 59 56 } 60 57 } 61 58 62 59 void AudioManager::update() 63 60 { … … 77 74 if (!playing) 78 75 { 79 if (currentBgSound < bgSounds.size()-1) 80 { 81 currentBgSound++; 82 } 83 else 84 { 85 currentBgSound=0; 86 } 76 // if (currentBgSound < bgSounds.size()-1) 77 // { 78 // currentBgSound++; 79 // } 80 // else 81 // { 82 // currentBgSound=0; 83 // } 84 // switch to next sound in list/array 85 currentBgSound = ++currentBgSound % bgSounds.size(); 86 87 87 if (!bgSounds[currentBgSound].isLoaded()) 88 88 { … … 96 96 } 97 97 } 98 98 99 99 void AudioManager::setPos(std::vector<float> newPosition) 100 100 { 101 101 102 102 } 103 103 104 104 void AudioManager::setSpeed(std::vector<float> newSpeed) 105 105 { 106 106 107 107 } 108 108 109 109 void AudioManager::setOri(std::vector<float> at, std::vector<float> up) 110 110 { 111 111 112 112 } 113 113 } -
code/branches/FICN/src/audio/CMakeLists.txt
r419 r458 1 1 PROJECT(Orxonox) 2 2 3 SET(SRC_FILES 3 SET(SRC_FILES 4 4 AudioIncludes.h 5 5 AudioManager.cc … … 8 8 AudioStream.cc 9 9 ) 10 SET(INC_FILES 10 SET(INC_FILES 11 11 AudioManager.h 12 12 AudioBuffer.h … … 15 15 ) 16 16 17 INCLUDE_DIRECTORIES(..) 17 18 18 19 ADD_LIBRARY(audio ${SRC_FILES} ${INC_FILES}) -
code/branches/FICN/src/orxonox/orxonox.cc
r430 r458 114 114 bool frameStarted(const FrameEvent& evt) 115 115 { 116 116 117 117 auMan->update(); 118 118 119 119 mKeyboard->capture(); 120 120 mMouse->capture(); … … 202 202 setupScene(); 203 203 setupInputSystem(); 204 setupCEGUI();204 // setupCEGUI(); 205 205 createFrameListener(); 206 206 startRenderLoop(); … … 215 215 // delete mSystem; 216 216 217 delete mListener;218 delete mRoot;217 // delete mListener; 218 // delete mRoot; 219 219 } 220 220 … … 294 294 295 295 string levelFile = "sp_level_moonstation.oxw"; 296 loader::LevelLoader* loader = new loader::LevelLoader(levelFile);296 // loader::LevelLoader* loader = new loader::LevelLoader(levelFile); 297 297 } 298 298 … … 359 359 } 360 360 361 void setupCEGUI()362 {363 Ogre::SceneManager *mgr = mRoot->getSceneManager("Default SceneManager");364 Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow();361 // void setupCEGUI() 362 // { 363 // Ogre::SceneManager *mgr = mRoot->getSceneManager("Default SceneManager"); 364 // Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow(); 365 365 366 366 // CEGUI setup … … 369 369 370 370 // Other CEGUI setup here. 371 }371 // } 372 372 373 373
Note: See TracChangeset
for help on using the changeset viewer.