Rhythm bullet mp3 support successful (prog calc a bit hacky)
This commit is contained in:
parent
29225f167d
commit
569af8adf9
@ -39,7 +39,7 @@ public class Mp3AudioData implements AudioData {
|
|||||||
public Mp3AudioData(FileHandle audioFile) {
|
public Mp3AudioData(FileHandle audioFile) {
|
||||||
try {
|
try {
|
||||||
MP3File mp3File = new MP3File(audioFile.file());
|
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;
|
durationInSeconds = mp3File.getMP3AudioHeader().getNumberOfFrames()/readWindowSize;
|
||||||
sampleRate = mp3File.getMP3AudioHeader().getSampleRateAsNumber();
|
sampleRate = mp3File.getMP3AudioHeader().getSampleRateAsNumber();
|
||||||
} catch (IOException | TagException | ReadOnlyFileException | InvalidAudioFrameException e) {
|
} catch (IOException | TagException | ReadOnlyFileException | InvalidAudioFrameException e) {
|
||||||
|
@ -60,7 +60,6 @@ public class Entity extends Actor implements Poolable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(HashMap<String, Float> params) {
|
public void init(HashMap<String, Float> params) {
|
||||||
params.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user