From 6c025858196b348c83ddd50e9233eb85c86c71d6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 27 Dec 2014 08:01:13 +0000 Subject: player: support playing splitfx YAML files This allows splitfx users to test CUE breakpoints and run file-specific effects without interrupting their normal flow. --- lib/dtas/splitfx.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/dtas/splitfx.rb') diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index ac39233..9af3faf 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -12,6 +12,7 @@ class DTAS::SplitFX # :nodoc: '$TRIMFX $RATEFX $DITHERFX' include DTAS::Process include DTAS::XS + attr_reader :infile, :env class Skip < Struct.new(:tstart) # :nodoc: def commit(_) @@ -76,6 +77,7 @@ class DTAS::SplitFX # :nodoc: } @tracks = [] @infmt = nil # wait until input is assigned + @cuebp = nil # for playback end def _bool(hash, key) @@ -334,4 +336,10 @@ class DTAS::SplitFX # :nodoc: end false end + + def cuebreakpoints + rv = @cuebp and return rv + require_relative 'cue_index' + @cuebp = @tracks.map { |t| DTAS::CueIndex.new(1, "#{t.tstart}s") } + end end -- cgit v1.2.3-24-ge0c7