Changeset 6232 for code/branches/presentation2/src
- Timestamp:
- Dec 3, 2009, 7:48:42 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/sound
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6222 r6232 170 170 171 171 this->source_ = source; 172 if (source_.empty()) 172 if (source_.empty()) 173 173 return; 174 174 -
code/branches/presentation2/src/orxonox/sound/SoundBuffer.cc
r6203 r6232 81 81 82 82 if (this->audioBuffer_ == AL_NONE) 83 ThrowException(General, "Sound : Standard file loader failed: " << alutGetErrorString(alutGetError()));83 ThrowException(General, "Sound Error: Standard file loader failed: " << alutGetErrorString(alutGetError())); 84 84 } 85 85 … … 127 127 COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl; 128 128 ov_clear(&vf); 129 ThrowException(General, "Sound : Ogg file loader failed when opening the bitstream");129 ThrowException(General, "Sound Error: Ogg file loader failed when opening the bitstream"); 130 130 } 131 131 … … 143 143 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl; 144 144 ov_clear(&vf); 145 ThrowException(General, "Sound : Ogg file loader failed when decoding the file");145 ThrowException(General, "Sound Error: Ogg file loader failed when decoding the file"); 146 146 } 147 147 else -
code/branches/presentation2/src/orxonox/sound/SoundManager.cc
r6208 r6232 484 484 else 485 485 { 486 shared_ptr<SoundBuffer> buffer(new SoundBuffer(fileInfo)); 486 shared_ptr<SoundBuffer> buffer; 487 try 488 { 489 buffer.reset(new SoundBuffer(fileInfo)); 490 } 491 catch (...) 492 { 493 COUT(1) << Exception::handleMessage() << std::endl; 494 return shared_ptr<SoundBuffer>(); 495 } 487 496 this->soundBuffers_[fileInfo->group + '/' + fileInfo->filename] = buffer; 488 497 return buffer; … … 494 503 std::map<std::string, weak_ptr<SoundBuffer> >::iterator it 495 504 = this->soundBuffers_.find(fileInfo->group + '/' + fileInfo->filename); 496 if (it == this->soundBuffers_.end())505 if (it != this->soundBuffers_.end()) 497 506 this->soundBuffers_.erase(it); 498 507 }
Note: See TracChangeset
for help on using the changeset viewer.