deploying mp2 player

This commit is contained in:
minjaesong
2023-01-15 16:42:09 +09:00
parent 6cb45f6d50
commit af03ab23aa
8 changed files with 226 additions and 969 deletions

View File

@@ -108,6 +108,8 @@ function printPlayBar() {
con.mvaddch(cy, 16 + Math.round(paintWidth * (currently / total)), 0xDB)
}
}
let errorlevel = 0
try {
while (!stopPlay && seqread.getReadCount() < FILE_SIZE && readLength > 0) {
if (interactive) {
sys.poke(-40, 1)
@@ -155,8 +157,16 @@ while (!stopPlay && seqread.getReadCount() < FILE_SIZE && readLength > 0) {
sys.sleep(10)
}
}
catch (e) {
printerrln(e)
errorlevel = 1
}
finally {
//audio.stop(0)
if (readPtr !== undefined) sys.free(readPtr)
if (decodePtr !== undefined) sys.free(decodePtr)
}
return errorlevel
//audio.stop(0)
if (readPtr !== undefined) sys.free(readPtr)
if (decodePtr !== undefined) sys.free(decodePtr)