我正嘗試使用gdx-audio擴展,但在解碼mp3時遇到問題。它工作,但非常慢! 10秒的文件正在6.57秒解碼:(這裏是方法:爲什麼本機libmpg123在android上使用libgdx需要這麼久?
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) {}
}
誰能告訴我這是爲什麼要花這麼長時間
你是怎麼開始使用lbmpg123的 –
沒有什麼祕密......我剛剛下載了庫並查看了api的文檔... – cmbryan