audio changes

This commit is contained in:
minjaesong
2026-04-16 21:58:06 +09:00
parent 6aa2542bb8
commit 7d899936e2
4 changed files with 31 additions and 19 deletions

View File

@@ -10,7 +10,7 @@ import net.torvald.tsvm.peripheral.MP2Env
*
* NOTES:
* 1. tracker mode is currently unimplemented.
* 2. PCM upload buffer (accessed by `putPcmDataByPtr`) is shared between four playheads
* 2. Synchronisation between playheads are not guaranteed. Do not play music in multiple tracks.
*
* ## How to upload PCM audio into a playhead
*

View File

@@ -41,7 +41,7 @@ private class RenderRunnable(val playhead: AudioAdapter.Playhead) : Runnable {
// printdbg("P${playhead.index+1} go back to spinning")
Thread.sleep(12)
Thread.sleep(6)
}
else if (playhead.isPlaying && writeQueue.isEmpty) {
printdbg("!! QUEUE EXHAUSTED !! QUEUE EXHAUSTED !! QUEUE EXHAUSTED !! QUEUE EXHAUSTED !! QUEUE EXHAUSTED !! QUEUE EXHAUSTED ")
@@ -49,7 +49,7 @@ private class RenderRunnable(val playhead: AudioAdapter.Playhead) : Runnable {
// TODO: wait for 1-2 seconds then finally stop the device
// playhead.audioDevice.stop()
Thread.sleep(12)
Thread.sleep(6)
}
}