mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-18 01:51:40 +00:00
Don't set a room rolloff factor
The reverb engine already handles an initial attenuation based on the attenuation of the dry path.
This commit is contained in:
parent
f0c9aae670
commit
845e369b87
1 changed files with 1 additions and 4 deletions
|
@ -1153,9 +1153,7 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
float rolloffFactor = 1.f;
|
|
||||||
bool manualRolloff = true;
|
bool manualRolloff = true;
|
||||||
|
|
||||||
ALuint buffer = GET_PTRID(sfx.data);
|
ALuint buffer = GET_PTRID(sfx.data);
|
||||||
ALuint source = FreeSfx.back();
|
ALuint source = FreeSfx.back();
|
||||||
if(rolloff->RolloffType == ROLLOFF_Log)
|
if(rolloff->RolloffType == ROLLOFF_Log)
|
||||||
|
@ -1165,7 +1163,6 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener
|
||||||
alSourcef(source, AL_REFERENCE_DISTANCE, rolloff->MinDistance/distscale);
|
alSourcef(source, AL_REFERENCE_DISTANCE, rolloff->MinDistance/distscale);
|
||||||
alSourcef(source, AL_MAX_DISTANCE, (1000.f+rolloff->MinDistance)/distscale);
|
alSourcef(source, AL_MAX_DISTANCE, (1000.f+rolloff->MinDistance)/distscale);
|
||||||
alSourcef(source, AL_ROLLOFF_FACTOR, rolloff->RolloffFactor);
|
alSourcef(source, AL_ROLLOFF_FACTOR, rolloff->RolloffFactor);
|
||||||
rolloffFactor = rolloff->RolloffFactor;
|
|
||||||
manualRolloff = false;
|
manualRolloff = false;
|
||||||
}
|
}
|
||||||
else if(rolloff->RolloffType == ROLLOFF_Linear && AL.EXT_source_distance_model)
|
else if(rolloff->RolloffType == ROLLOFF_Linear && AL.EXT_source_distance_model)
|
||||||
|
@ -1240,7 +1237,7 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener
|
||||||
alSourcei(source, AL_DIRECT_FILTER, AL_FILTER_NULL);
|
alSourcei(source, AL_DIRECT_FILTER, AL_FILTER_NULL);
|
||||||
alSource3i(source, AL_AUXILIARY_SEND_FILTER, 0, 0, AL_FILTER_NULL);
|
alSource3i(source, AL_AUXILIARY_SEND_FILTER, 0, 0, AL_FILTER_NULL);
|
||||||
}
|
}
|
||||||
alSourcef(source, AL_ROOM_ROLLOFF_FACTOR, rolloffFactor);
|
alSourcef(source, AL_ROOM_ROLLOFF_FACTOR, 0.f);
|
||||||
alSourcef(source, AL_PITCH, PITCH(pitch));
|
alSourcef(source, AL_PITCH, PITCH(pitch));
|
||||||
}
|
}
|
||||||
else if(WasInWater && !(chanflags&SNDF_NOREVERB))
|
else if(WasInWater && !(chanflags&SNDF_NOREVERB))
|
||||||
|
|
Loading…
Reference in a new issue