29 alGenBuffers(1, &m_bufferId);
30 assert(alGetError() == AL_NO_ERROR);
35 alDeleteBuffers(1, &m_bufferId);
36 assert(alGetError() == AL_NO_ERROR);
42 if(
format == AL_UNDETERMINED) {
48 int read = soundFile->
read(&samples[0], soundFile->
getSize());
59 alBufferData(m_bufferId, sampleFormat, &data[0], size, rate);
60 ALenum err = alGetError();
61 if(err != AL_NO_ERROR) {