mp3 decoding but slow

This commit is contained in:
minjaesong
2023-01-14 16:45:33 +09:00
parent f23dedc245
commit 994db188c2
13 changed files with 672 additions and 211 deletions

View File

@@ -86,10 +86,10 @@ audio.setMasterVolume(0, 255)
let readLength = 1
function printPlayBar(startOffset) {
function printPlayBar() {
if (interactive) {
let currently = seqread.getReadCount() - startOffset
let total = FILE_SIZE - startOffset - 8
let currently = seqread.getReadCount()
let total = FILE_SIZE
let currentlySec = Math.round(bytesToSec(currently))
let totalSec = Math.round(bytesToSec(total))
@@ -157,6 +157,6 @@ while (!stopPlay && seqread.getReadCount() < FILE_SIZE && readLength > 0) {
}
audio.stop(0)
//audio.stop(0)
if (readPtr !== undefined) sys.free(readPtr)
if (decodePtr !== undefined) sys.free(decodePtr)