- Timestamp:
- Jan 29, 2006, 2:10:48 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/ogg_player.cc
r5283 r6827 34 34 { 35 35 this->setClassID(CL_SOUND_OGG_PLAYER, "OggPlayer"); 36 37 this->source = 0; 38 36 39 if (fileName != NULL) 37 40 { … … 70 73 alGenBuffers(2, buffers); 71 74 check(); 72 alGenSources(1, &source);75 SoundEngine::getInstance()->popALSource(this->source); 73 76 check(); 74 77 … … 88 91 alSourceStop(source); 89 92 empty(); 90 alDeleteSources(1, &source);93 SoundEngine::getInstance()->pushALSource(source); 91 94 check(); 92 95 alDeleteBuffers(1, buffers); -
trunk/src/story_entities/game_world.cc
r6780 r6827 366 366 PNode::getNullParent()->updateNode (this->dtS); 367 367 SoundEngine::getInstance()->update(); 368 //music->update(); 368 369 if (this->dataTank->music != NULL) 370 this->dataTank->music->update(); 369 371 } 370 372 … … 435 437 436 438 engine->draw(); 437 438 /* final draw command */439 439 } 440 440 -
trunk/src/story_entities/game_world_data.cc
r6815 r6827 280 280 LoadParamXML(root, "GraphicsEngine", GraphicsEngine::getInstance(), GraphicsEngine, loadParams); 281 281 282 LoadParam(root, "Music", this, GameWorldData, setSoundTrack); 283 282 284 // LoadParamXML(root, "ParticleEngine", ParticleEngine::getInstance(), ParticleEngine, loadParams); 283 285 //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams); … … 311 313 void GameWorldData::setSoundTrack(const char* name) 312 314 { 315 if (this->music != NULL) 316 delete this->music; 317 313 318 PRINTF(3)("Setting Sound Track to %s\n", name); 314 319 this->music = (OggPlayer*)ResourceManager::getInstance()->load(name, OGG, RP_LEVEL); -
trunk/src/story_entities/game_world_data.h
r6634 r6827 52 52 virtual ErrorMessage unloadScene(); 53 53 54 55 54 public: 56 55 GLMenuImageScreen* glmis; //!< The Level-Loader Display
Note: See TracChangeset
for help on using the changeset viewer.