Changeset 12846 in josm for trunk/src/org/openstreetmap/josm/io/audio
- Timestamp:
- 2017-09-13T23:24:50+02:00 (7 years ago)
- 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 5 5 import java.net.URL; 6 6 7 import org.openstreetmap.josm. Main;7 import org.openstreetmap.josm.spi.preferences.Config; 8 8 import org.openstreetmap.josm.tools.JosmRuntimeException; 9 9 import org.openstreetmap.josm.tools.Logging; … … 234 234 command = new Execute(); 235 235 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 */); 238 238 try { 239 239 soundPlayer = (SoundPlayer) Class.forName("org.openstreetmap.josm.io.audio.JavaFxMediaPlayer").getConstructor().newInstance(); -
trunk/src/org/openstreetmap/josm/io/audio/AudioUtil.java
r12620 r12846 16 16 17 17 import org.openstreetmap.josm.Main; 18 import org.openstreetmap.josm.spi.preferences.Config; 18 19 import org.openstreetmap.josm.tools.Logging; 19 20 … … 44 45 * audioFormat.getFrameSize() /* bytes per frame */; 45 46 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 */); 47 48 return naturalLength / calibration; 48 49 } catch (UnsupportedAudioFileException | IOException e) {
Note:
See TracChangeset
for help on using the changeset viewer.