v0.8.2: Various stability improvements/fixes:

- fixed concurrency errrors in Sample.java
- added a null safety check to IconTitle
- fixed further rare freezing errors with tengu jumping
- reverted Android 'singleInstance' change, due to stability issues
This commit is contained in:
Evan Debenham
2020-07-09 13:42:35 -04:00
parent a2b4e3a9b6
commit 2478e18ba6
4 changed files with 16 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ public enum Sample {
private boolean enabled = true;
private float globalVolume = 1f;
public void reset() {
public synchronized void reset() {
for (Sound sound : ids.values()){
sound.dispose();
@@ -45,13 +45,13 @@ public enum Sample {
}
public void pause() {
public synchronized void pause() {
for (Sound sound : ids.values()) {
sound.pause();
}
}
public void resume() {
public synchronized void resume() {
for (Sound sound : ids.values()) {
sound.resume();
}
@@ -75,7 +75,7 @@ public enum Sample {
}
public void unload( Object src ) {
public synchronized void unload( Object src ) {
if (ids.containsKey( src )) {
ids.get( src ).dispose();
ids.remove( src );