Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5930 in orxonox.OLD for trunk/src/lib/sound/sound_buffer.cc


Ignore:
Timestamp:
Dec 5, 2005, 12:50:26 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: remake of the SoundEngine (faster, and millions of SoundSources can be defined, as Many are not needed for playing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/sound/sound_buffer.cc

    r5422 r5930  
    2020#include "sound_engine.h"
    2121
    22 
    2322using namespace std;
    24 
    2523
    2624//////////////////
     
    3634  this->setName(fileName);
    3735
    38   SoundEngine::getInstance()->addBuffer(this);
    39 
    4036  ALenum format;
    4137  ALvoid* data;
     
    4743  alGenBuffers(1, &this->bufferID);
    4844  if ((result = alGetError()) != AL_NO_ERROR)
    49     SoundEngine::PrintALErrorString(result);
     45    PRINTF(2)("%s\n", SoundEngine::getALErrorString(result));
    5046
    5147  // read in the wav data
     
    5955#endif
    6056  if ((result = alGetError()) != AL_NO_ERROR)
    61     SoundEngine::PrintALErrorString(result);
     57    PRINTF(2)("%s\n", SoundEngine::getALErrorString(result));
    6258
    6359  // send the loaded wav data to the buffer
    6460  alBufferData(this->bufferID, format, data, this->size, freq);
    6561  if ((result = alGetError()) != AL_NO_ERROR)
    66     SoundEngine::PrintALErrorString(result);
     62    PRINTF(2)("%s\n", SoundEngine::getALErrorString(result));
    6763
    6864  // remove the wav data (redundant)
    6965  alutUnloadWAV(format, data, this->size, freq);
    7066  if ((result = alGetError()) != AL_NO_ERROR)
    71     SoundEngine::PrintALErrorString(result);
     67    PRINTF(2)("%s\n", SoundEngine::getALErrorString(result));
    7268}
    7369
Note: See TracChangeset for help on using the changeset viewer.