Skip to content

Commit

Permalink
Merge pull request #6401 from Card-Forge/kevlahnota-patch-3
Browse files Browse the repository at this point in the history
Update AudioClip.java
  • Loading branch information
kevlahnota authored Oct 21, 2024
2 parents 21a738e + b4bffe9 commit 1a815b4
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions forge-gui-mobile/src/forge/sound/AudioClip.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ public final void play(float value) {
catch (InterruptedException ex) {
ex.printStackTrace();
}
clip.play(value);
try {
clip.play(value);
} catch (Exception e) {
e.printStackTrace();
}
}

public final void loop() {
Expand All @@ -65,13 +69,21 @@ public final void loop() {
catch (InterruptedException ex) {
ex.printStackTrace();
}
clip.loop();
try {
clip.loop();
} catch (Exception e) {
e.printStackTrace();
}
}

@Override
public void dispose() {
if (clip != null) {
clip.dispose();
try {
clip.dispose();
} catch (Exception e) {
e.printStackTrace();
}
clip = null;
}
}
Expand All @@ -80,7 +92,11 @@ public final void stop() {
if (clip == null) {
return;
}
clip.stop();
try {
clip.stop();
} catch (Exception e) {
e.printStackTrace();
}
}

public final boolean isDone() {
Expand Down

0 comments on commit 1a815b4

Please sign in to comment.