--- src/sound.cpp.origin 2005-10-30 10:07:48.000000000 +0100 +++ src/sound.cpp 2005-11-05 07:36:27.000000000 +0100 @@ -185,6 +185,13 @@ alDeleteSources(1, &sources[i]); } + // Destroy the sound context and device (Gentoo) + mSoundContext = alcGetCurrentContext(); + mSoundDevice = alcGetContextsDevice( mSoundContext ); + alcDestroyContext( mSoundContext ); + if ( mSoundDevice) + alcCloseDevice( mSoundDevice ); + alutExit(); delete [] buffers; --- include/sound.h.origin 2005-11-04 21:09:44.000000000 +0100 +++ include/sound.h 2005-11-05 07:36:01.000000000 +0100 @@ -97,6 +97,10 @@ float master_volume; public: + // Gentoo + ALCdevice* mSoundDevice; + ALCcontext* mSoundContext; + void Load(); void LoadAllSoundFiles(); void LoadSoundFile(string filename); @@ -156,6 +160,9 @@ void UnloadWave(ALvoid* data);*/ int tochannel(int handle); + + // Gentoo + float master_volume; public: void Load(); @@ -174,6 +181,10 @@ void SetPitch(int sid, float pitch); void SetGain(int sid, float gain); void StopSource(int sid); + + // Gentoo + void SetMasterVolume(float newvol) {master_volume = newvol; if (master_volume < 0) master_volume = 0; if (master_volume > 1) master_volume = 1;} + float GetMasterVolume() {return master_volume;} //void SetPos(int sid, VERTEX pos); //void SetVel(int sid, VERTEX vel);