Why is native libmpg123 taking so long on android with libgdx?
- by cmbryan
I'm trying to use the gdx-audio extensions, but am having trouble decoding mp3s. It works, but very slowly!! A 10-second file is taking 6.57 seconds to decode :( Here is the method:
public void decode() {
Mpg123Decoder decoder = new Mpg123Decoder(externalFile);
short[] sampleArray = new short[1024];
// read until we reach the end of the file
while (decoder.readSamples(sampleArray, 0, sampleArray.length) > 0) {}
}
Can anyone tell me why this is taking so long?