Changeset 4204 in orxonox.OLD for orxonox/branches/openAL/src/lib/sound
- Timestamp:
- May 17, 2005, 2:05:57 AM (20 years ago)
- Location:
- orxonox/branches/openAL/src/lib/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/openAL/src/lib/sound/sound_engine.cc
r4203 r4204 24 24 #include "list.h" 25 25 #include "AL/alc.h" 26 26 #include "resource_manager.h" 27 27 using namespace std; 28 28 … … 164 164 SoundEngine::singletonRef = NULL; 165 165 166 } 166 // deleting all the Resources 167 tIterator<SoundSource>* sourceIterator = this->sourceList->getIterator(); 168 SoundSource* enumSource = sourceIterator->nextElement(); 169 while (enumSource) 170 { 171 delete enumSource; 172 enumSource = sourceIterator->nextElement(); 173 } 174 delete sourceIterator; 175 176 tIterator<SoundBuffer>* bufferIterator = this->bufferList->getIterator(); 177 SoundBuffer* enumBuffer = bufferIterator->nextElement(); 178 while (enumBuffer) 179 { 180 ResourceManager::getInstance()->unload(enumBuffer); 181 enumBuffer = bufferIterator->nextElement(); 182 } 183 delete bufferIterator; 184 } 185 186 /** 187 \brief creates a new SoundSource. 188 \param fileName The Name to load the SoundBuffer from 189 \param The sourceNode to bind this SoundSource to. 190 \returns The newly created SoundSource 191 192 acctualy this is nothing more than a wrapper around the ResourceManager. 193 */ 194 SoundSource* SoundEngine::createSource(const char* fileName, PNode* sourceNode) 195 { 196 return new SoundSource((SoundBuffer*)ResourceManager::getInstance()->load(fileName, WAV, RP_LEVEL), sourceNode); 197 } 198 167 199 168 200 /** -
orxonox/branches/openAL/src/lib/sound/sound_engine.h
r4203 r4204 71 71 virtual ~SoundEngine(void); 72 72 73 SoundSource* createSource(const char* fileName, PNode* sourceNode); 74 73 75 void setListener(PNode* listener); 74 76
Note: See TracChangeset
for help on using the changeset viewer.