Changeset 549 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2008-02-18T21:41:29+01:00 (17 years ago)
Author:
david
Message:

remove redundant jump code - jumps always done by restarting audio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r547 r549  
    2929        private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED }
    3030        private State state;
    31     private enum Command { PLAY, PAUSE, JUMP }
     31    private enum Command { PLAY, PAUSE }
    3232    private enum Result { WAITING, OK, FAILED }
    3333    private URL playingUrl;
     
    6060                        send();
    6161                }
    62                 protected void jump(double offset) throws Exception {
    63                         this.offset = offset;
    64                         command = Command.JUMP;
    65                         send();
    66                 }
    6762                private void send() throws Exception {
    6863                        result = Result.WAITING;
     
    115110        public static void play(URL url, double seconds) throws Exception {
    116111                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 end
    122          * Starts from the beginning if would jump before start
    123          * @param seconds fast forwards (positive) or rewinds (negative) by this number of seconds
    124          * @throws audio fault exception, e.g. can't open stream,  unhandleable audio format
    125          */
    126         public static void jump(double seconds) throws Exception {
    127                 AudioPlayer.get().command.jump(seconds);
    128112        }
    129113       
     
    292276                                                stateChange = state.PAUSED;
    293277                                                break;
    294                                         case JUMP:
    295                                                 stateChange = state.PAUSED; // for now
    296                                                 break;
    297278                                        }
    298279                                        command.ok(stateChange);
Note: See TracChangeset for help on using the changeset viewer.