Switched to ALSA Soloud backend / Fixed sound muffling at start
This commit is contained in:
@@ -27,13 +27,13 @@ public class SoundControl{
|
|||||||
public Seq<Music> bossMusic = Seq.with();
|
public Seq<Music> bossMusic = Seq.with();
|
||||||
|
|
||||||
protected Music lastRandomPlayed;
|
protected Music lastRandomPlayed;
|
||||||
protected Interval timer = new Interval();
|
protected Interval timer = new Interval(4);
|
||||||
protected @Nullable Music current;
|
protected @Nullable Music current;
|
||||||
protected float fade;
|
protected float fade;
|
||||||
protected boolean silenced;
|
protected boolean silenced;
|
||||||
|
|
||||||
protected AudioBus uiBus = new AudioBus();
|
protected AudioBus uiBus = new AudioBus();
|
||||||
protected boolean wasPaused, wasPlaying;
|
protected boolean wasPlaying;
|
||||||
protected AudioFilter filter = new BiquadFilter(){{
|
protected AudioFilter filter = new BiquadFilter(){{
|
||||||
set(0, 500, 1);
|
set(0, 500, 1);
|
||||||
}};
|
}};
|
||||||
@@ -117,9 +117,8 @@ public class SoundControl{
|
|||||||
fade = 0f;
|
fade = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fade the lowpass filter in/out
|
//fade the lowpass filter in/out, poll every 30 ticks just in case performance is an issue
|
||||||
if(paused != wasPaused){
|
if(timer.get(1, 30f)){
|
||||||
wasPaused = paused;
|
|
||||||
Core.audio.soundBus.fadeFilterParam(0, Filters.paramWet, paused ? 1f : 0f, 0.4f);
|
Core.audio.soundBus.fadeFilterParam(0, Filters.paramWet, paused ? 1f : 0f, 0.4f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=90dcc6533cc38b415a18202963e35d9c16587c2a
|
archash=e327ec0bf805e7ad3cb4d95b242bf8424c487a64
|
||||||
|
|||||||
Reference in New Issue
Block a user