From c3a5925dedf9a05113fc896892907be785077bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=95=B5=E5=95=B5?= Date: Fri, 20 Jan 2023 14:59:26 +0800 Subject: [PATCH] =?UTF-8?q?scene=E4=B8=8Eaudio=E7=BB=91=E5=AE=9A,=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=8D=E8=AE=BE=E7=BD=AEss=E5=92=8Cto=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B,=E4=BC=9A=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=BB=8Eaudio=E7=9A=840=E7=A7=92=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=88=B0scene=E7=9A=84duration=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/audio/audio.js | 8 ++++++++ lib/creator.js | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/lib/audio/audio.js b/lib/audio/audio.js index 1b4bd021..73558fbb 100755 --- a/lib/audio/audio.js +++ b/lib/audio/audio.js @@ -63,6 +63,14 @@ class FFAudio extends FFBase { this.fadeOut = fadeOut; } + setSs(ss) { + this.ss = ss; + } + + setTo(to) { + this.to = to; + } + addInput(command) { const { loop, ss, to, path } = this; diff --git a/lib/creator.js b/lib/creator.js index 876f2cc4..a45167ee 100755 --- a/lib/creator.js +++ b/lib/creator.js @@ -298,6 +298,12 @@ class FFCreator extends FFCon { const duration = this.getPrevScenesDuration(index - 1); audio.start = duration + audio.start; } + + if(!audio.hasSSTO()) { + audio.setSs("0:00.000") + audio.setTo(scene.duration) + } + }); audios = audios.concat(scene.audios); });