Changeset 12462 in josm for trunk/src/org
- Timestamp:
- 2017-07-10T01:34:48+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/audio/JavaFxMediaPlayer.java
r12414 r12462 56 56 57 57 @Override 58 public void play(Execute command, State stateChange, URL playingUrl) throws AudioException, IOException {58 public synchronized void play(Execute command, State stateChange, URL playingUrl) throws AudioException, IOException { 59 59 try { 60 60 final URL url = command.url(); … … 86 86 87 87 @Override 88 public void pause(Execute command, State stateChange, URL playingUrl) throws AudioException, IOException {88 public synchronized void pause(Execute command, State stateChange, URL playingUrl) throws AudioException, IOException { 89 89 if (mediaPlayer != null) { 90 90 try { … … 103 103 104 104 @Override 105 public double position() {106 return mediaPlayer .getCurrentTime().toSeconds();105 public synchronized double position() { 106 return mediaPlayer != null ? mediaPlayer.getCurrentTime().toSeconds() : -1; 107 107 } 108 108 109 109 @Override 110 public double speed() {111 return mediaPlayer .getCurrentRate();110 public synchronized double speed() { 111 return mediaPlayer != null ? mediaPlayer.getCurrentRate() : -1; 112 112 } 113 113
Note:
See TracChangeset
for help on using the changeset viewer.