Changeset 1677 in josm for trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
- Timestamp:
- 2009-06-17T10:04:22+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r1462 r1677 20 20 */ 21 21 public class AudioUtil { 22 23 static public double getCalibratedDuration(File wavFile) {22 23 static public double getCalibratedDuration(File wavFile) { 24 24 try { 25 AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(26 new URL("file:".concat(wavFile.getAbsolutePath())));25 AudioInputStream audioInputStream = AudioSystem.getAudioInputStream( 26 new URL("file:".concat(wavFile.getAbsolutePath()))); 27 27 AudioFormat audioFormat = audioInputStream.getFormat(); 28 28 long filesize = wavFile.length(); … … 34 34 return naturalLength / calibration; 35 35 } catch (Exception e) { 36 return 0.0;36 return 0.0; 37 37 } 38 } 39 38 } 40 39 } 41
Note:
See TracChangeset
for help on using the changeset viewer.
