Changeset 7296 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Apr 14, 2006, 1:45:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/sound/ogg_player.cc
r7295 r7296 59 59 bool OggPlayer::open(const std::string& fileName) 60 60 { 61 // release old State62 if ( state & FileOpened)63 release();61 // release old Ogg-File 62 if (this->state & FileOpened) 63 this->release(); 64 64 65 65 // allocating Buffers … … 81 81 else 82 82 { 83 PRINTF(2)("No more Sources Availiable (maybe you should consider raising the source-count \n");83 PRINTF(2)("No more Sources Availiable (maybe you should consider raising the source-count.)\n"); 84 84 this->release(); 85 85 return false; … … 119 119 alSourcei (source, AL_SOURCE_RELATIVE, AL_TRUE ); 120 120 alSourcef (source, AL_GAIN, SoundEngine::getInstance()->getMusicVolume()); 121 SoundEngine::checkError("OggPlayer:: SetSourceProperties", __LINE__);121 SoundEngine::checkError("OggPlayer::open()::SetSourceProperties", __LINE__); 122 122 123 123 return true; … … 125 125 126 126 /** 127 * releases a stream127 * @brief releases a stream 128 128 */ 129 129 void OggPlayer::release() … … 175 175 this->state |= Playing; 176 176 177 if(! stream(buffers[0]) || !stream(buffers[1]))177 if(!this->stream(this->buffers[0]) || !this->stream(this->buffers[1])) 178 178 return false; 179 179 … … 181 181 if (DEBUG >= 3) 182 182 SoundEngine::checkError("OggPlayer::playback()::alSourceQueueBuffers", __LINE__); 183 if (!alIsBuffer(this->buffers[0])) printf("AHA0\n"); 184 if (!alIsBuffer(this->buffers[1])) printf("AHA1\n"); 185 186 if (!alIsSource(this->source)) printf("AHA2\n"); 187 SoundEngine::checkError("SKJFLKSDJF",__LINE__); 188 183 189 alSourcePlay(this->source); 184 190 if (DEBUG >= 3) … … 268 274 alBufferData(buffer, format, pcm, size, vorbisInfo->rate); 269 275 if (DEBUG >= 3) 270 SoundEngine::checkError("OggPlayer:: playback()::BUFFER", __LINE__);276 SoundEngine::checkError("OggPlayer::stream()::BUFFER", __LINE__); 271 277 272 278 return true;
Note: See TracChangeset
for help on using the changeset viewer.