@@ -27,7 +27,7 @@ public class SpeakerAudio extends Audio {
2727 private final WeakReference <SpeakerBlockEntity > speakerBlockEntity ;
2828 private final ConcurrentHashMap <UUID , MpscArrayQueue <short []>> audioBuffers = new ConcurrentHashMap <>();
2929 protected int x , y , z ;
30- public static final float REVERB_ENHANCE = 1.5f ;
30+ public static final float REVERB_ENHANCE = 3f ;
3131
3232 public SpeakerAudio (SpeakerBlockEntity speakerBlockEntity , int sampleRate ) {
3333 super (sampleRate );
@@ -59,12 +59,12 @@ public void updateSourceParameters(SourceAudioData data, int auxSlot) {
5959 if (distance >= 32 ) {
6060 extraDecay = 1 - (distance - 32 ) / 32 ;
6161 }
62- double wallDecay = Math .pow (0.5 , data .wallThickness ());
63- alFilterf (this .alDirectFilter , AL_LOWPASS_GAIN , (float ) (extraDecay * correctedGain * wallDecay / REVERB_ENHANCE ));
62+ double directWallDecay = Math .pow (0.5 , data .wallThickness ());
63+ alFilterf (this .alDirectFilter , AL_LOWPASS_GAIN , (float ) (extraDecay * correctedGain * directWallDecay ));
6464 alFilterf (this .alDirectFilter , AL_LOWPASS_GAINHF , data .directHF ());
6565 alSourcei (this .alSource , AL_DIRECT_FILTER , this .alDirectFilter );
6666
67- alFilterf (this .alReverbFilter , AL_LOWPASS_GAIN , (float ) (extraDecay * wallDecay ));
67+ alFilterf (this .alReverbFilter , AL_LOWPASS_GAIN , (float ) (Math . sqrt ( data . reverbGain ()) * REVERB_ENHANCE ));
6868 alFilterf (this .alReverbFilter , AL_LOWPASS_GAINHF , 1 );
6969 alSource3i (this .alSource , AL_AUXILIARY_SEND_FILTER , auxSlot , 0 , this .alReverbFilter );
7070
@@ -83,7 +83,7 @@ public boolean play() {
8383
8484 @ Override
8585 protected float getGain () {
86- return REVERB_ENHANCE * AudioHelper .db2factor (ChannelClientConfig .get ().outputAdjust );
86+ return AudioHelper .db2factor (ChannelClientConfig .get ().outputAdjust );
8787 }
8888
8989 @ Override
0 commit comments