[Opentnl-cvs] tnl/zap sfx.cpp,1.7,1.8
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-04-21 01:59:34
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15792/zap Modified Files: sfx.cpp Log Message: Fixed OpenAL on Mac (sortof) Index: sfx.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/sfx.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sfx.cpp 20 Apr 2004 22:17:46 -0000 1.7 --- sfx.cpp 21 Apr 2004 01:59:26 -0000 1.8 *************** *** 148,151 **** --- 148,154 ---- alSourcei(source, AL_BUFFER, gBuffers[mSFXIndex]); alSourcei(source, AL_LOOPING, mProfile->isLooping); + alSourcef(source, AL_REFERENCE_DISTANCE,9000); + alSourcef(source, AL_ROLLOFF_FACTOR,1); + alSourcef(source, AL_MAX_DISTANCE, 10000); updateMovementParams(); *************** *** 204,207 **** --- 207,211 ---- void SFXObject::init() { + ALint error; gDevice = alcOpenDevice((ALubyte *) "DirectSound3D"); if(!gDevice) *************** *** 220,232 **** alcMakeContextCurrent(gContext); ! alGetError(); alDistanceModel(AL_NONE); // load up all the sound buffers ! alGenBuffers(NumSFXBuffers, gBuffers); ! ! if(alGetError() != AL_NO_ERROR) ! return; alGenSources(NumSources, gSources); --- 224,238 ---- alcMakeContextCurrent(gContext); ! error = alGetError(); ! ! alGenBuffers(NumSFXBuffers, gBuffers); ! error = alGetError(); alDistanceModel(AL_NONE); + error = alGetError(); // load up all the sound buffers ! //if(error != AL_NO_ERROR) ! // return; alGenSources(NumSources, gSources); |