hopefully more stable?

This commit is contained in:
minjaesong
2023-11-26 19:39:03 +09:00
parent 29c4d92542
commit 2e9a755252

View File

@@ -110,7 +110,7 @@ object AudioMixer: Disposable {
while (processing) { while (processing) {
parallelProcessingSchedule.forEach { tracks -> parallelProcessingSchedule.forEach { tracks ->
val callables = tracks.map { Callable { /*val callables = tracks.map { Callable {
if (!it.processor.paused) { if (!it.processor.paused) {
it.processor.run() it.processor.run()
} }
@@ -118,7 +118,20 @@ object AudioMixer: Disposable {
processingExecutor.renew() processingExecutor.renew()
processingExecutor.submitAll(callables) processingExecutor.submitAll(callables)
processingExecutor.join() processingExecutor.join()*/
val threads = tracks.map { Thread {
if (!it.processor.paused) {
it.processor.run()
}
}.also { it.priority = MAX_PRIORITY } }
try {
threads.forEach { it.start() }
threads.forEach { it.join() }
}
catch (e: InterruptedException) {}
} }
while (!masterTrack.pcmQueue.isEmpty) { while (!masterTrack.pcmQueue.isEmpty) {