From: Anders B. <vr-...@us...> - 2004-11-23 14:06:10
|
Update of /cvsroot/alpp/openalpp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22381/src Modified Files: sample.cpp Log Message: Added constructor to class Sample that takes raw data as parameter. Index: sample.cpp =================================================================== RCS file: /cvsroot/alpp/openalpp/src/sample.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sample.cpp 11 Nov 2004 07:57:58 -0000 1.8 --- sample.cpp 23 Nov 2004 14:06:00 -0000 1.9 *************** *** 51,54 **** --- 51,63 ---- } + Sample::Sample(ALenum format,ALvoid* data,ALsizei size,ALsizei freq) throw (FileError) + : SoundData() { + ALenum error; + + alBufferData(buffername_,format,data,size,freq); + if((error=alGetError())!=AL_FALSE) + throw FileError("Error buffering sound"); + } + std::string Sample::getFileName() const { return filename_; |