Changeset 5871 in josm for trunk/src/org/openstreetmap/josm/actions/audio
- Timestamp:
- 2013-04-15T23:12:33+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions/audio
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/audio/AudioBackAction.java
r4982 r5871 15 15 import org.openstreetmap.josm.tools.Shortcut; 16 16 17 /** 18 * Jump the audio backward 10 seconds and start playing if paused. 19 * @since 547 20 */ 17 21 public class AudioBackAction extends JosmAction { 18 22 23 /** 24 * Constructs a new {@code AudioBackAction}. 25 */ 19 26 public AudioBackAction() { 20 27 super(trc("audio", "Back"), "audio-back", trc("audio", "Jump back."), … … 27 34 if (AudioPlayer.playing() || AudioPlayer.paused()) 28 35 AudioPlayer.play(AudioPlayer.url(), AudioPlayer.position() 29 - Main.pref.getDouble("audio.forwardbackamount", "10.0"));36 - Main.pref.getDouble("audio.forwardbackamount", 10.0)); 30 37 else 31 38 MarkerLayer.playAudio(); -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFastSlowAction.java
r1245 r5871 9 9 import org.openstreetmap.josm.tools.Shortcut; 10 10 11 /** 12 * Abstract superclass of {@link AudioFasterAction} and {@link AudioSlowerAction}. 13 * @since 563 14 */ 11 15 abstract public class AudioFastSlowAction extends JosmAction { 12 16 13 17 private double multiplier; 14 18 19 /** 20 * Constructs a new {@code AudioFastSlowAction}. 21 * 22 * @param name the action's text as displayed on the menu (if it is added to a menu) 23 * @param iconName the filename of the icon to use 24 * @param tooltip a longer description of the action that will be displayed in the tooltip. 25 * @param shortcut a ready-created shortcut object. 26 * @param fast {@code true} to increase speed (faster audio), {@code false} to decrease it (slower audio). 27 */ 15 28 public AudioFastSlowAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean fast) { 16 29 super(name, iconName, tooltip, shortcut, true); 17 multiplier = Main.pref.getDouble("audio.fastfwdmultiplier", "1.3");30 multiplier = Main.pref.getDouble("audio.fastfwdmultiplier", 1.3); 18 31 if (! fast) 19 32 multiplier = 1.0 / multiplier; -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java
r4982 r5871 10 10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 /** 13 * Increase the speed of audio playback. 14 * Each use increases the speed further until one of the other controls is used. 15 * @since 563 16 */ 12 17 public class AudioFasterAction extends AudioFastSlowAction { 13 18 19 /** 20 * Constructs a new {@code AudioFasterAction}. 21 */ 14 22 public AudioFasterAction() { 15 23 super(trc("audio", "Faster"), "audio-faster", trc("audio", "Faster Forward"), -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java
r4982 r5871 14 14 import org.openstreetmap.josm.tools.Shortcut; 15 15 16 /** 17 * Jump the audio forward 10 seconds. 18 * @since 547 19 */ 16 20 public class AudioFwdAction extends JosmAction { 21 22 /** 23 * Constructs a new {@code AudioFwdAction}. 24 */ 17 25 public AudioFwdAction() { 18 26 super(trc("audio", "Forward"), "audio-fwd", trc("audio", "Jump forward"), … … 24 32 if (AudioPlayer.playing() || AudioPlayer.paused()) 25 33 AudioPlayer.play(AudioPlayer.url(), AudioPlayer.position() 26 + Main.pref.getDouble("audio.forwardbackamount", "10.0"));34 + Main.pref.getDouble("audio.forwardbackamount", 10.0)); 27 35 else 28 36 MarkerLayer.playAudio(); -
trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java
r4982 r5871 12 12 import org.openstreetmap.josm.tools.Shortcut; 13 13 14 /** 15 * Play the sound track from the Audio Marker after the one most recently played.<br/> 16 * Play from the first such Marker if none has been played, or repeat the last marker if at the end. 17 * @since 547 18 */ 14 19 public class AudioNextAction extends JosmAction { 15 20 21 /** 22 * Constructs a new {@code AudioNextAction}. 23 */ 16 24 public AudioNextAction() { 17 25 super(trc("audio", "Next Marker"), "audio-next", trc("audio", "Play next marker."), -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
r4982 r5871 13 13 import org.openstreetmap.josm.tools.Shortcut; 14 14 15 /** 16 * If not playing, play the sound track from the first Audio Marker, or from the point at which it was paused.<br/> 17 * If playing, pause the sound.<br/> 18 * If fast forwarding or slow forwarding, resume normal speed. 19 * @since 547 20 */ 15 21 public class AudioPlayPauseAction extends JosmAction { 16 22 23 /** 24 * Constructs a new {@code AudioPlayPauseAction}. 25 */ 17 26 public AudioPlayPauseAction() { 18 27 super(trc("audio", "Play/Pause"), "audio-playpause", tr("Play/pause audio."), -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java
r4982 r5871 12 12 import org.openstreetmap.josm.tools.Shortcut; 13 13 14 /** 15 * Play the sound track from the Audio Marker before the one most recently played.<br/> 16 * Play from the first such Marker if none has been played or already at the first marker. 17 * @since 547 18 */ 14 19 public class AudioPrevAction extends JosmAction { 15 20 21 /** 22 * Constructs a new {@code AudioPrevAction}. 23 */ 16 24 public AudioPrevAction() { 17 25 super(trc("audio", "Previous Marker"), "audio-prev", trc("audio", "Play previous marker."), -
trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java
r4982 r5871 10 10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 /** 13 * Decrease the speed of audio playback. 14 * Each use decreases the speed further until one of the other controls is used. 15 * @since 563 16 */ 12 17 public class AudioSlowerAction extends AudioFastSlowAction { 13 18 19 /** 20 * Constructs a new {@code AudioSlowerAction}. 21 */ 14 22 public AudioSlowerAction() { 15 23 super(trc("audio", "Slower"), "audio-slower", trc("audio", "Slower Forward"), 16 Shortcut.registerShortcut("audio:slower", tr("Audio: {0}", trc("audio", "Slower")), KeyEvent.VK_F4, Shortcut.DIRECT), true);24 Shortcut.registerShortcut("audio:slower", tr("Audio: {0}", trc("audio", "Slower")), KeyEvent.VK_F4, Shortcut.DIRECT), false); 17 25 this.putValue("help", ht("/Action/AudioSlower")); 18 26 }
Note:
See TracChangeset
for help on using the changeset viewer.