- Timestamp:
- Apr 15, 2006, 9:48:08 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/ogg_player.cc
r7296 r7297 140 140 } 141 141 empty(); 142 SoundEngine::getInstance()->pushALSource(source); 142 alSourcei(this->source, AL_BUFFER, 0); 143 SoundEngine::getInstance()->pushALSource(this->source); 143 144 this->source = 0; 144 145 this->state &= !SourceAllocated; -
trunk/src/lib/sound/sound_source.cc
r7291 r7297 25 25 26 26 /** 27 * creates a SoundSource at position sourceNode with the SoundBuffer buffer27 * @brief creates a SoundSource at position sourceNode with the SoundBuffer buffer 28 28 */ 29 29 SoundSource::SoundSource(const PNode* sourceNode, const SoundBuffer* buffer) … … 42 42 43 43 /** 44 * deletes a SoundSource44 * @brief deletes a SoundSource 45 45 */ 46 46 SoundSource::~SoundSource() … … 50 50 51 51 /** 52 * Plays back a SoundSource52 * @brief Plays back a SoundSource 53 53 */ 54 54 void SoundSource::play() … … 92 92 93 93 /** 94 * Stops playback of a SoundSource94 * @brief Stops playback of a SoundSource 95 95 */ 96 96 void SoundSource::stop() … … 102 102 if (DEBUG >= 3) 103 103 SoundEngine::checkError("StopSource", __LINE__); 104 alSourcei(this->sourceID, AL_BUFFER, 0); 104 105 SoundEngine::getInstance()->pushALSource(this->sourceID); 105 106 this->sourceID = 0; … … 108 109 109 110 /** 110 * Pauses Playback of a SoundSource111 * @brief Pauses Playback of a SoundSource 111 112 */ 112 113 void SoundSource::pause() … … 118 119 119 120 /** 120 * Rewinds Playback of a SoundSource121 * @brief Rewinds Playback of a SoundSource 121 122 */ 122 123 void SoundSource::rewind() … … 129 130 130 131 /** 131 * sets the RolloffFactor of the Sound emitted from the SoundSource132 * @brief sets the RolloffFactor of the Sound emitted from the SoundSource 132 133 * @param rolloffFactor The Factor described 133 134 134 * 135 * this tells openAL how fast the Sounds decay outward from the Source 135 136 */ 136 137 void SoundSource::setRolloffFactor(ALfloat rolloffFactor) -
trunk/src/story_entities/game_world.cc
r7296 r7297 136 136 int GameWorld::createAudioThread(void* gameWorld) 137 137 { 138 /*GameWorld* gw = (GameWorld*)gameWorld;138 GameWorld* gw = (GameWorld*)gameWorld; 139 139 printf("STARTIG AUDIO THREAD\n"); 140 140 if(gw->dataTank && gw->dataTank->music != NULL) … … 146 146 gw->dataTank->music->update(); 147 147 SDL_Delay(1); 148 } */149 //printf("End the AudioThread\n");148 } 149 printf("End the AudioThread\n"); 150 150 } 151 151 … … 229 229 if (this->audioThread == NULL) 230 230 this->audioThread = SDL_CreateThread(GameWorld::createAudioThread, (void*)this); 231 232 if (this->dataTank->music != NULL)233 this->dataTank->music->playback();234 231 235 232 this->run(); … … 413 410 PNode::getNullParent()->updateNode (this->dtS); 414 411 SoundEngine::getInstance()->update(); 415 416 if (this->dataTank->music != NULL)417 this->dataTank->music->update();418 419 412 } 420 413
Note: See TracChangeset
for help on using the changeset viewer.