Changeset 6729
- Timestamp:
- Apr 15, 2010, 1:32:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound5/src/orxonox/sound/SoundStreamer.cc
r6726 r6729 107 107 if(alcGetCurrentContext() == NULL) 108 108 { 109 COUT(2) << "Sound: There is no context, terminating thread "<< std::endl;109 COUT(2) << "Sound: There is no context, terminating thread for " << dataStream->getName() << std::endl; 110 110 return; 111 111 } … … 123 123 COUT(2) << "Sound: Warning: Couldn't unqueue buffers: " << getALErrorString(error) << std::endl; 124 124 125 int info; 126 alGetSourcei(audioSource, AL_SOURCE_STATE, &info); 127 if(info == AL_PLAYING) 128 COUT(4) << "Sound: " << dataStream->getName() << " is playing." << std::endl; 129 else 130 COUT(4) << "Sound: " << dataStream->getName() << " is not playing." << std::endl; 131 125 132 for(int i = 0; i < processed; i++) 126 133 { … … 132 139 else if (ret < 0) 133 140 { 134 COUT(2) << "Sound: libvorbisfile: error reading the file "<< std::endl;141 COUT(2) << "Sound: libvorbisfile: error reading the file " << dataStream->getName() << std::endl; 135 142 ov_clear(&vf); 136 143 return; … … 153 160 catch(boost::thread_interrupted) { 154 161 COUT(4) << "Sound: Catched interruption. Terminating thread for " << dataStream->getName() << std::endl; 162 ALuint* buffers = new ALuint[5]; 163 alSourceUnqueueBuffers(audioSource, 5, buffers); 164 if (ALint error = alGetError()) 165 COUT(2) << "Sound: Warning: Couldn't unqueue buffers: " << getALErrorString(error) << std::endl; 166 167 alDeleteBuffers(5, buffers); 168 if (ALint error = alGetError()) 169 COUT(2) << "Sound: Warning: Couldn't delete buffers: " << getALErrorString(error) << std::endl; 170 155 171 return; 156 172 }
Note: See TracChangeset
for help on using the changeset viewer.