Rhythm bullet mp3 support successful (prog calc a bit hacky)

This commit is contained in:
Harrison Deng 2017-08-16 23:13:10 -05:00
parent 29225f167d
commit 569af8adf9
2 changed files with 1 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public class Mp3AudioData implements AudioData {
public Mp3AudioData(FileHandle audioFile) {
try {
MP3File mp3File = new MP3File(audioFile.file());
sampleCount = mp3File.getMP3AudioHeader().getNumberOfFrames();
sampleCount = (long) (mp3File.getMP3AudioHeader().getPreciseTrackLength()*mp3File.getMP3AudioHeader().getSampleRateAsNumber()) + 2; //TODO figure out why this is correct since this way of calc was discovered by testing.
durationInSeconds = mp3File.getMP3AudioHeader().getNumberOfFrames()/readWindowSize;
sampleRate = mp3File.getMP3AudioHeader().getSampleRateAsNumber();
} catch (IOException | TagException | ReadOnlyFileException | InvalidAudioFrameException e) {

View File

@ -60,7 +60,6 @@ public class Entity extends Actor implements Poolable {
}
public void init(HashMap<String, Float> params) {
params.clear();
}
/**