Changeset 5961 in orxonox.OLD for branches/avi_play/src/lib/sound/sound_buffer.cc
- Timestamp:
- Dec 7, 2005, 2:53:43 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/sound/sound_buffer.cc
r5422 r5961 20 20 #include "sound_engine.h" 21 21 22 23 22 using namespace std; 24 25 23 26 24 ////////////////// … … 36 34 this->setName(fileName); 37 35 38 SoundEngine::getInstance()->addBuffer(this);39 40 36 ALenum format; 41 37 ALvoid* data; … … 47 43 alGenBuffers(1, &this->bufferID); 48 44 if ((result = alGetError()) != AL_NO_ERROR) 49 SoundEngine::PrintALErrorString(result);45 PRINTF(2)("%s\n", SoundEngine::getALErrorString(result)); 50 46 51 47 // read in the wav data … … 59 55 #endif 60 56 if ((result = alGetError()) != AL_NO_ERROR) 61 SoundEngine::PrintALErrorString(result);57 PRINTF(2)("%s\n", SoundEngine::getALErrorString(result)); 62 58 63 59 // send the loaded wav data to the buffer 64 60 alBufferData(this->bufferID, format, data, this->size, freq); 65 61 if ((result = alGetError()) != AL_NO_ERROR) 66 SoundEngine::PrintALErrorString(result);62 PRINTF(2)("%s\n", SoundEngine::getALErrorString(result)); 67 63 68 64 // remove the wav data (redundant) 69 65 alutUnloadWAV(format, data, this->size, freq); 70 66 if ((result = alGetError()) != AL_NO_ERROR) 71 SoundEngine::PrintALErrorString(result);67 PRINTF(2)("%s\n", SoundEngine::getALErrorString(result)); 72 68 } 73 69
Note: See TracChangeset
for help on using the changeset viewer.