From 34610d05723be029e296d646fb5c6df5b37cd148 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Fri, 2 Feb 2018 21:49:07 +0100 Subject: [PATCH] Preventing more than one audio file from being processed simultaneously --- .../rhubarb_lip_sync/rhubarb_for_spine/AnimationFileModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AnimationFileModel.kt b/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AnimationFileModel.kt index 14a6df3..3a1f610 100644 --- a/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AnimationFileModel.kt +++ b/extras/rhubarb-for-spine/src/main/kotlin/com/rhubarb_lip_sync/rhubarb_for_spine/AnimationFileModel.kt @@ -50,10 +50,10 @@ class AnimationFileModel(animationFilePath: Path) { var mouthShapesError by mouthShapesErrorProperty private set + private val executor = Executors.newSingleThreadExecutor() val audioFileModelsProperty = SimpleListProperty( spineJson.audioEvents .map { event -> - val executor = Executors.newSingleThreadExecutor() AudioFileModel(event, this, executor, { result -> saveAnimation(result, event.name) }) } .observable()