audio:short function to enqueue decoded mp2; playmov:no more choppy audio

This commit is contained in:
minjaesong
2023-01-21 19:43:11 +09:00
parent b60b5bada6
commit 99212adea3
7 changed files with 18 additions and 48 deletions

View File

@@ -83,7 +83,7 @@ function getRepeatCount(fnum) {
return (fnum == 1) ? 2 : 1
}
else if ("MP2fr" == AUDIOFORMAT) {
let r = Math.ceil((AUDIO_SAMPLE_SIZE*2 - audioSamplesWrote) / AUDIO_SAMPLE_SIZE) + ((fnum == 1) ? 1 : 0)
let r = Math.ceil((AUDIO_SAMPLE_SIZE - audioSamplesWrote) / AUDIO_SAMPLE_SIZE) + ((fnum == 1) ? 1 : 0)
return (fnum > TOTAL_FRAMES) ? Math.ceil(audioRemaining / MP2_PACKETSIZE) : r
}
}