less CPU demanding InputStrobing

This commit is contained in:
minjaesong
2023-01-16 04:31:31 +09:00
parent af03ab23aa
commit 5b86e88779
6 changed files with 19 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
println("DEPRECATION NOTICE: MP3 Playback function will be removed for following reason")
println("\tMP3 does not really fit in the time TSVM targets to emulate")
return 1
const Mp3 = require('mp3dec')
const pcm = require("pcm")
const interactive = exec_args[2] && exec_args[2].toLowerCase() == "/i"
@@ -114,7 +119,6 @@ let readPtr = sys.malloc(8000)
let decodePtr = sys.malloc(12000)
function bytesToSec(i) {
// using fixed value: FRAME_SIZE(216) bytes for 36 ms on sampling rate 32000 Hz
return i / (FRAME_SIZE * 1000 / bufRealTimeLen)
}
function secToReadable(n) {