Changeset 557 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2008-02-24T15:33:15+01:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r556 r557 33 33 private URL playingUrl; 34 34 private double leadIn; // seconds 35 private double calibration; // ratio of purported duration of samples to true duration 35 36 private double position; // seconds 36 37 private double bytesPerSecond; … … 176 177 } catch (NumberFormatException e) { 177 178 leadIn = 1.0; // failed to parse 179 } 180 try { 181 calibration = Double.parseDouble(Main.pref.get("audio.calibration", "1.0" /* default, ratio */)); 182 } catch (NumberFormatException e) { 183 calibration = 1.0; // failed to parse 178 184 } 179 185 start(); … … 248 254 nBytesRead = 0; 249 255 position = 0.0; 250 double adjustedOffset = offset - leadIn; 256 double adjustedOffset = (offset - leadIn) * calibration; 251 257 bytesPerSecond = audioFormat.getFrameRate() /* frames per second */ 252 258 * audioFormat.getFrameSize() /* bytes per frame */;
Note:
See TracChangeset
for help on using the changeset viewer.
