diff --git a/data/audio/audio.cfg b/data/audio/audio.cfg index 66f8c21b8..b39d28fec 100644 --- a/data/audio/audio.cfg +++ b/data/audio/audio.cfg @@ -401,9 +401,9 @@ audio_module /*Building FX*/ - audio "oilpump.ogg" loop 20 1800 - audio "powerhum.ogg" loop 20 1800 - audio "powerspk.ogg" oneshot 20 1800 + audio "oilpump.ogg" loop 10 1800 + audio "powerhum.ogg" loop 15 1800 + audio "powerspk.ogg" oneshot 15 1800 audio "steam.ogg" oneshot 20 1800 audio "ecmtower.ogg" oneshot 20 1800 audio "freroar.ogg" oneshot 100 1800 diff --git a/lib/sound/openal_track.c b/lib/sound/openal_track.c index d505550ad..b549d1173 100644 --- a/lib/sound/openal_track.c +++ b/lib/sound/openal_track.c @@ -420,9 +420,9 @@ BOOL sound_Play2DSample( TRACK *psTrack, AUDIO_SAMPLE *psSample, BOOL bQueued ) { return FALSE; } - volume = ((float)psTrack->iVol / 100.0f); // each object can have OWN volume! - psSample->fVol = volume; // save volume - volume *= sfx_volume; // and now take into account the Users sound Prefs. + volume = ((float)psTrack->iVol / 100.0f); // each object can have OWN volume! + psSample->fVol = volume; // save computed volume + volume *= sfx_volume; // and now take into account the Users sound Prefs. alGenSources( 1, &(psSample->iSample) ); alSourcef( psSample->iSample, AL_PITCH, 1.0f ); alSourcef( psSample->iSample, AL_GAIN,volume ); @@ -459,9 +459,9 @@ BOOL sound_Play3DSample( TRACK *psTrack, AUDIO_SAMPLE *psSample ) { return FALSE; } - - volume = ((float)psTrack->iVol / 100.0); // max range is 0-100 - psSample->fVol = volume; // store results for later + + volume = ((float)psTrack->iVol / 100.0); // max range is 0-100 + psSample->fVol = volume; // store results for later alGenSources( 1, &(psSample->iSample) ); // HACK: this is a workaround for a bug in the 64bit implementation of OpenAL on GNU/Linux // The AL_PITCH value really should be 1.0. diff --git a/lib/sound/track.h b/lib/sound/track.h index c9fa25a6e..b384b857d 100644 --- a/lib/sound/track.h +++ b/lib/sound/track.h @@ -71,7 +71,7 @@ typedef struct AUDIO_SAMPLE ALuint iSample; // OpenAL name of the sound source #endif SDWORD x, y, z; - float fVol; // computed volume of sample + float fVol; // computed volume of sample BOOL bFinishedPlaying; AUDIO_CALLBACK pCallback; void *psObj;