Ignore:
Timestamp:
2017-09-13T23:24:50+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - use Config.getPref() wherever possible

Location:
trunk/src/org/openstreetmap/josm/io/audio
Files:
2 edited

Legend:

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

    r12715 r12846  
    55import java.net.URL;
    66
    7 import org.openstreetmap.josm.Main;
     7import org.openstreetmap.josm.spi.preferences.Config;
    88import org.openstreetmap.josm.tools.JosmRuntimeException;
    99import org.openstreetmap.josm.tools.Logging;
     
    234234        command = new Execute();
    235235        playingUrl = null;
    236         double leadIn = Main.pref.getDouble("audio.leadin", 1.0 /* default, seconds */);
    237         double calibration = Main.pref.getDouble("audio.calibration", 1.0 /* default, ratio */);
     236        double leadIn = Config.getPref().getDouble("audio.leadin", 1.0 /* default, seconds */);
     237        double calibration = Config.getPref().getDouble("audio.calibration", 1.0 /* default, ratio */);
    238238        try {
    239239            soundPlayer = (SoundPlayer) Class.forName("org.openstreetmap.josm.io.audio.JavaFxMediaPlayer").getConstructor().newInstance();
  • trunk/src/org/openstreetmap/josm/io/audio/AudioUtil.java

    r12620 r12846  
    1616
    1717import org.openstreetmap.josm.Main;
     18import org.openstreetmap.josm.spi.preferences.Config;
    1819import org.openstreetmap.josm.tools.Logging;
    1920
     
    4445                * audioFormat.getFrameSize() /* bytes per frame */;
    4546            double naturalLength = filesize / bytesPerSecond;
    46             double calibration = Main.pref.getDouble("audio.calibration", 1.0 /* default, ratio */);
     47            double calibration = Config.getPref().getDouble("audio.calibration", 1.0 /* default, ratio */);
    4748            return naturalLength / calibration;
    4849        } catch (UnsupportedAudioFileException | IOException e) {
Note: See TracChangeset for help on using the changeset viewer.