Changeset 5954 for code/branches/sound3/src/orxonox
- Timestamp:
- Oct 14, 2009, 4:59:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound3/src/orxonox/sound/BaseSound.cc
r5946 r5954 111 111 void BaseSound::setSource(const std::string& source) 112 112 { 113 this->source_ = source; 114 if (!GameMode::playsSound()) 115 return; 116 117 if (source.empty() && alIsSource(this->audioSource_)) 113 if (!GameMode::playsSound()) 114 { 115 this->source_ = source; 116 return; 117 } 118 119 if (this->source_ != source && alIsSource(this->audioSource_)) 118 120 { 119 121 // Unload sound … … 121 123 alDeleteSources(1, &this->audioSource_); 122 124 alDeleteBuffers(1, &this->audioBuffer_); 125 } 126 127 this->source_ = source; 128 129 if(source_.empty()) 130 { 123 131 return; 124 132 }
Note: See TracChangeset
for help on using the changeset viewer.