From b6f03c8f2b11be887307975db08c63dddb2d889f Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 30 Dec 2021 12:03:54 -0700 Subject: [PATCH] skip voice tracks when skipping dialogue --- src/hollywoo/Director.hx | 1 + src/hollywoo/Movie.kiss | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hollywoo/Director.hx b/src/hollywoo/Director.hx index 6628fec..586b098 100644 --- a/src/hollywoo/Director.hx +++ b/src/hollywoo/Director.hx @@ -17,6 +17,7 @@ interface Director{}))) - (let [cc ->:Void {(director.hideDialog) (cc)}] - (director.showDialog actorName dialogType wryly text cc) + (let [cc ->:Void {(director.hideDialog) (cc)} + &mut skipCC cc] // When an actorName is given, check for a voiced line to play. // Otherwise, assume it is un-voiced super text (when (and actorName (< 0 (count voiceTracks))) (case (try (dictGet voiceLines "$actorName $text") (catch [e] (print e) null)) ((objectWith trackKey start end) - (director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc)) - (otherwise))))) + (director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc) + (set skipCC ->:Void {(director.stopVoiceTrack (dictGet voiceTracks trackKey)) (cc)})) + (otherwise))) + (director.showDialog actorName dialogType wryly text skipCC))) (method newVoiceTrack [actorName :VoiceTrack track :String lineJson] (let [actorNumVoiceTracks (or (dictGet voiceTracksPerActor actorName) 0)