- Timestamp:
- Apr 19, 2005, 2:33:02 AM (20 years ago)
- Location:
- orxonox/branches/sound_engine/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/sound_engine/src/util/resource_manager.cc
r3884 r3891 19 19 20 20 // different resource Types 21 #include "sound_engine.h" 21 22 #include "objModel.h" 22 23 #include "primitive_model.h" … … 150 151 tmpType = OBJ; 151 152 else if (!strncmp(fileName+(strlen(fileName)-4), ".wav", 4)) 152 tmpType = WAV; 153 { 154 tmpType = WAV; 155 PRINTF(2)("not determined of what type the resource is %s EFFECT OR MUSIC\n"); 156 } 153 157 else if (!strncmp(fileName+(strlen(fileName)-4), ".mp3", 4)) 154 tmpType = MP3; 158 { 159 tmpType = MP3; 160 PRINTF(2)("not determined of what type the resource is %s EFFECT OR MUSIC\n"); 161 } 155 162 else if (!strncmp(fileName+(strlen(fileName)-4), ".ogg", 4)) 156 tmpType = OGG; 163 { 164 tmpType = OGG; 165 PRINTF(2)("not determined of what type the resource is %s EFFECT OR MUSIC\n"); 166 } 157 167 else if (!strcmp(fileName, "cube") || 158 168 !strcmp(fileName, "sphere") || … … 205 215 switch(type) 206 216 { 217 case RESOURCE_SOUND_EFFECT: 218 if(isFile(fullName)) 219 tmpResource->pointer = new SoundEffect(fullName); 220 break; 221 case RESOURCE_SOUND_MUSIC: 222 if(isFile(fullName)) 223 tmpResource->pointer = new Music(fullName); 224 break; 207 225 case OBJ: 208 226 if (param1) … … 342 360 switch(resource->type) 343 361 { 362 case RESOURCE_SOUND_EFFECT: 363 case RESOURCE_SOUND_MUSIC: 364 delete (Sound*)resource->pointer; 365 break; 344 366 case OBJ: 345 367 case PRIM: -
orxonox/branches/sound_engine/src/util/resource_manager.h
r3884 r3891 19 19 20 20 //! An eumerator for different fileTypes the resourceManager supports \todo WAV, MP3, OGG support 21 enum ResourceType {OBJ, PRIM, WAV, MP3, OGG, TTF, IMAGE}; 21 enum ResourceType {OBJ, 22 PRIM, 23 WAV, 24 MP3, 25 OGG, 26 TTF, 27 IMAGE, 28 RESOURCE_SOUND_EFFECT, 29 RESOURCE_SOUND_MUSIC}; 22 30 //! An enumerator for different UNLOAD-types. 23 31 /**
Note: See TracChangeset
for help on using the changeset viewer.