Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2007, 5:12:16 PM (16 years ago)
Author:
nicolape
Message:
  • Added CmakeLists so that it works on my machine for testing
  • Fixed a Bug in AudioBuffer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/audio/src/audio/AudioBuffer.cc

    r349 r350  
    55        AudioBuffer::AudioBuffer(std::string fileName)
    66        {
    7                
     7                // Load wav data into buffers.
     8                alGenBuffers(1, &buffer);
     9
     10                if(alGetError() != AL_NO_ERROR)
     11                        loaded=AL_FALSE;
     12
     13                alutLoadWAVFile((ALbyte*)fileName.c_str(), &format, &data, &size, &freq, &loop);
     14                alBufferData(buffer, format, data, size, freq);
     15                alutUnloadWAV(format, data, size, freq);
     16
     17                // Do another error check and return.
     18                if(alGetError() != AL_NO_ERROR)
     19                        loaded=AL_FALSE;
     20       
     21                loaded=AL_TRUE;
    822        }
    923       
Note: See TracChangeset for help on using the changeset viewer.