mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
hopefully more stable?
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user