mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Calculate the AL_GAIN by s_volume and don't set a global AL_GAIN
This commit is contained in:
parent
548bbeb129
commit
1f5012aec3
3 changed files with 6 additions and 2 deletions
4
README
4
README
|
@ -618,6 +618,10 @@ vary). The most important options (tested with OpenAL Soft 1.14) are:
|
|||
several hard to resamples sound effects. Especially the earthquake sound can
|
||||
distort if a low quality resampler is employed!
|
||||
|
||||
If the sound is distorted and cracking, most likely the ingame volume is set too
|
||||
high. Lower it by setting the "s_volume" CVAR to 0.3 or even less and use the
|
||||
system mixer instead!
|
||||
|
||||
===============================================================================
|
||||
|
||||
6. Bugreports
|
||||
|
|
|
@ -475,7 +475,6 @@ AL_Update(void)
|
|||
AL_CopyVector(listener_forward, orientation);
|
||||
AL_CopyVector(listener_up, orientation + 3);
|
||||
qalListenerfv(AL_ORIENTATION, orientation);
|
||||
qalListenerf(AL_GAIN, s_volume->value / 3);
|
||||
qalDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
|
||||
|
||||
/* update spatialization for dynamic sounds */
|
||||
|
|
|
@ -698,7 +698,7 @@ S_IssuePlaysound(playsound_t *ps)
|
|||
#if USE_OPENAL
|
||||
if (sound_started == SS_OAL)
|
||||
{
|
||||
ch->oal_vol = ps->volume;
|
||||
ch->oal_vol = ps->volume * (s_volume->value);
|
||||
AL_PlayChannel(ch);
|
||||
}
|
||||
else
|
||||
|
@ -1182,6 +1182,7 @@ S_RawSamples(int samples, int rate, int width,
|
|||
#if USE_OPENAL
|
||||
if (sound_started == SS_OAL)
|
||||
{
|
||||
volume = volume * (s_volume->value);
|
||||
AL_RawSamples(samples, rate, width, channels, data, volume);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue