From 2b1b8ba62064d9595a78f8f017c903b80021b056 Mon Sep 17 00:00:00 2001 From: Recrown Date: Wed, 3 Jan 2018 21:36:14 -0600 Subject: [PATCH] just some cleanup before recoding things...y --- .../rhythmbullet/desktop/audio/Mp3Manager.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java index e786a2e..26f7b76 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/Mp3Manager.java @@ -9,7 +9,7 @@ import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; -import org.tritonus.share.sampled.file.TAudioFileFormat; +import org.jaudiotagger.audio.AudioFile; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; @@ -30,7 +30,7 @@ public class Mp3Manager implements MusicManager { private AudioInputStream ais; private AudioFormat af; private AudioSampleReader d; - private Map properties; + public Mp3Manager(FileHandle file) { this.fileHandle = file; @@ -49,18 +49,6 @@ public class Mp3Manager implements MusicManager { } catch (IOException | UnsupportedAudioFileException e) { e.printStackTrace(); } - - try { - // TAudioFileFormat properties - AudioFileFormat baseFileFormat = AudioSystem.getAudioFileFormat(file.file()); - if (baseFileFormat instanceof TAudioFileFormat) { - properties = ((TAudioFileFormat)baseFileFormat).properties(); - } - } catch (UnsupportedAudioFileException | IOException e) { - e.printStackTrace(); - } - - Gdx.app.debug("Property Count", String.valueOf(properties.size())); } @Override @@ -112,7 +100,7 @@ public class Mp3Manager implements MusicManager { @Override public float getDuration() { - return ((long) properties.get("duration"))/1000000f; + return 0; } @Override