Ignore:
Timestamp:
2013-04-15T23:12:33+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8611 (audio slower broken) + update all audio javadoc

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  
    1515import org.openstreetmap.josm.tools.Shortcut;
    1616
     17/**
     18 * Jump the audio backward 10 seconds and start playing if paused.
     19 * @since 547
     20 */
    1721public class AudioBackAction extends JosmAction {
    1822
     23    /**
     24     * Constructs a new {@code AudioBackAction}.
     25     */
    1926    public AudioBackAction() {
    2027        super(trc("audio", "Back"), "audio-back", trc("audio", "Jump back."),
     
    2734            if (AudioPlayer.playing() || AudioPlayer.paused())
    2835                AudioPlayer.play(AudioPlayer.url(), AudioPlayer.position()
    29                 - Main.pref.getDouble("audio.forwardbackamount","10.0"));
     36                - Main.pref.getDouble("audio.forwardbackamount", 10.0));
    3037            else
    3138                MarkerLayer.playAudio();
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFastSlowAction.java

    r1245 r5871  
    99import org.openstreetmap.josm.tools.Shortcut;
    1010
     11/**
     12 * Abstract superclass of {@link AudioFasterAction} and {@link AudioSlowerAction}.
     13 * @since 563
     14 */
    1115abstract public class AudioFastSlowAction extends JosmAction {
    1216
    1317    private double multiplier;
    1418
     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     */
    1528    public AudioFastSlowAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean fast) {
    1629        super(name, iconName, tooltip, shortcut, true);
    17         multiplier = Main.pref.getDouble("audio.fastfwdmultiplier","1.3");
     30        multiplier = Main.pref.getDouble("audio.fastfwdmultiplier", 1.3);
    1831        if (! fast)
    1932            multiplier = 1.0 / multiplier;
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java

    r4982 r5871  
    1010import org.openstreetmap.josm.tools.Shortcut;
    1111
     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 */
    1217public class AudioFasterAction extends AudioFastSlowAction {
    1318
     19    /**
     20     * Constructs a new {@code AudioFasterAction}.
     21     */
    1422    public AudioFasterAction() {
    1523        super(trc("audio", "Faster"), "audio-faster", trc("audio", "Faster Forward"),
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java

    r4982 r5871  
    1414import org.openstreetmap.josm.tools.Shortcut;
    1515
     16/**
     17 * Jump the audio forward 10 seconds.
     18 * @since 547
     19 */
    1620public class AudioFwdAction extends JosmAction {
     21   
     22    /**
     23     * Constructs a new {@code AudioFwdAction}.
     24     */
    1725    public AudioFwdAction() {
    1826        super(trc("audio", "Forward"), "audio-fwd", trc("audio", "Jump forward"),
     
    2432            if (AudioPlayer.playing() || AudioPlayer.paused())
    2533                AudioPlayer.play(AudioPlayer.url(), AudioPlayer.position()
    26                 + Main.pref.getDouble("audio.forwardbackamount","10.0"));
     34                + Main.pref.getDouble("audio.forwardbackamount", 10.0));
    2735            else
    2836                MarkerLayer.playAudio();
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java

    r4982 r5871  
    1212import org.openstreetmap.josm.tools.Shortcut;
    1313
     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 */
    1419public class AudioNextAction extends JosmAction {
    1520
     21    /**
     22     * Constructs a new {@code AudioNextAction}.
     23     */
    1624    public AudioNextAction() {
    1725        super(trc("audio", "Next Marker"), "audio-next", trc("audio", "Play next marker."),
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java

    r4982 r5871  
    1313import org.openstreetmap.josm.tools.Shortcut;
    1414
     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 */
    1521public class AudioPlayPauseAction extends JosmAction {
    1622
     23    /**
     24     * Constructs a new {@code AudioPlayPauseAction}.
     25     */
    1726    public AudioPlayPauseAction() {
    1827        super(trc("audio", "Play/Pause"), "audio-playpause", tr("Play/pause audio."),
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java

    r4982 r5871  
    1212import org.openstreetmap.josm.tools.Shortcut;
    1313
     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 */
    1419public class AudioPrevAction extends JosmAction {
    1520
     21    /**
     22     * Constructs a new {@code AudioPrevAction}.
     23     */
    1624    public AudioPrevAction() {
    1725        super(trc("audio", "Previous Marker"), "audio-prev", trc("audio", "Play previous marker."),
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java

    r4982 r5871  
    1010import org.openstreetmap.josm.tools.Shortcut;
    1111
     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 */
    1217public class AudioSlowerAction extends AudioFastSlowAction {
    1318
     19    /**
     20     * Constructs a new {@code AudioSlowerAction}.
     21     */
    1422    public AudioSlowerAction() {
    1523        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);
    1725        this.putValue("help", ht("/Action/AudioSlower"));
    1826    }
Note: See TracChangeset for help on using the changeset viewer.