Changeset 549 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-02-18T21:41:29+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r547 r549 29 29 private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED } 30 30 private State state; 31 private enum Command { PLAY, PAUSE , JUMP}31 private enum Command { PLAY, PAUSE } 32 32 private enum Result { WAITING, OK, FAILED } 33 33 private URL playingUrl; … … 60 60 send(); 61 61 } 62 protected void jump(double offset) throws Exception {63 this.offset = offset;64 command = Command.JUMP;65 send();66 }67 62 private void send() throws Exception { 68 63 result = Result.WAITING; … … 115 110 public static void play(URL url, double seconds) throws Exception { 116 111 AudioPlayer.get().command.play(url, seconds); 117 }118 119 /**120 * Fast Forward or Rewind the audio stream by the given number of seconds.121 * Terminates playing if would jump after the end122 * Starts from the beginning if would jump before start123 * @param seconds fast forwards (positive) or rewinds (negative) by this number of seconds124 * @throws audio fault exception, e.g. can't open stream, unhandleable audio format125 */126 public static void jump(double seconds) throws Exception {127 AudioPlayer.get().command.jump(seconds);128 112 } 129 113 … … 292 276 stateChange = state.PAUSED; 293 277 break; 294 case JUMP:295 stateChange = state.PAUSED; // for now296 break;297 278 } 298 279 command.ok(stateChange);
Note:
See TracChangeset
for help on using the changeset viewer.