mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-06 05:28:31 +09:00
audio changes
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user