[Jrisk-cvs] SF.net SVN: domination-code:[2540] Domination
Brought to you by:
yuranet
|
From: <yu...@us...> - 2024-05-08 18:22:27
|
Revision: 2540
http://sourceforge.net/p/domination/code/2540
Author: yuranet
Date: 2024-05-08 18:22:25 +0000 (Wed, 08 May 2024)
Log Message:
-----------
run without class fix
Modified Paths:
--------------
Domination/ChangeLog.txt
Domination/sharedUI/src_mapstore_lobby/net/yura/domination/audio/SimpleAudio.java
Modified: Domination/ChangeLog.txt
===================================================================
--- Domination/ChangeLog.txt 2024-05-08 18:16:58 UTC (rev 2539)
+++ Domination/ChangeLog.txt 2024-05-08 18:22:25 UTC (rev 2540)
@@ -14,7 +14,7 @@
Increment1GUI: 2
CommandLine: 2
-1.3.1 (08.05.2024) (svn rev 2539)
+1.3.1 (08.05.2024) (svn rev 2540)
Sounds effects and music! (memory leak fixed this time)
Can change game speed in Option dialog
Modified: Domination/sharedUI/src_mapstore_lobby/net/yura/domination/audio/SimpleAudio.java
===================================================================
--- Domination/sharedUI/src_mapstore_lobby/net/yura/domination/audio/SimpleAudio.java 2024-05-08 18:16:58 UTC (rev 2539)
+++ Domination/sharedUI/src_mapstore_lobby/net/yura/domination/audio/SimpleAudio.java 2024-05-08 18:22:25 UTC (rev 2540)
@@ -100,28 +100,31 @@
@Override
public void stop(final String audioFile) {
- singleThread.execute(new Runnable() {
- @Override
- public void run() {
- try {
- Player player = currentPlayers.remove(audioFile);
- if (player != null) {
- // this is not needed as we only start and stop from a single thread
- //if (player.getState() != Player.STARTED) {
- // LOGGER.log(Level.INFO, "player not started yet, will stop with listener: " + audioFile);
- // player.addPlayerListener(SimpleAudio.this);
- //}
- player.stop();
+ try {
+ singleThread.execute(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Player player = currentPlayers.remove(audioFile);
+ if (player != null) {
+ // this is not needed as we only start and stop from a single thread
+ //if (player.getState() != Player.STARTED) {
+ // LOGGER.log(Level.INFO, "player not started yet, will stop with listener: " + audioFile);
+ // player.addPlayerListener(SimpleAudio.this);
+ //}
+ player.stop();
+ }
+ else {
+ // this really should never happen
+ LOGGER.log(Level.INFO, "unable to stop, not found: " + audioFile);
+ }
}
- else {
- // this really should never happen
- LOGGER.log(Level.INFO, "unable to stop, not found: " + audioFile);
+ catch (Exception ex) {
+ LOGGER.log(Level.WARNING, "unable to stop " + audioFile, ex);
}
}
- catch (Exception ex) {
- LOGGER.log(Level.WARNING, "unable to stop " + audioFile, ex);
- }
- }
- });
+ });
+ }
+ catch (Error error) {}
}
}
|