just some cleanup before recoding things...y

This commit is contained in:
Harrison Deng 2018-01-03 21:36:14 -06:00
parent 15a35f65dc
commit 2b1b8ba620

View File

@ -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<String, Object> 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