diff options
author | Eric Wong <e@80x24.org> | 2015-01-03 01:09:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-03 01:09:02 +0000 |
commit | 7a43e7b2f7b483c0aee9cf01b8a15778dee69d5b (patch) | |
tree | cca7f675d592f8875f2bbcf71eebb2efd24b2482 /lib/dtas/splitfx.rb | |
parent | 54956f0529053fbf7a10c44419d97836e7817a6e (diff) | |
download | dtas-7a43e7b2f7b483c0aee9cf01b8a15778dee69d5b.tar.gz |
These are intended to act like `$(@D)' and `$(@F)' in GNU make(1) and to ease managing temporary files for some effects (e.g. noiseprof + noisered in sox) for splitfx users.
Diffstat (limited to 'lib/dtas/splitfx.rb')
-rw-r--r-- | lib/dtas/splitfx.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 36cdf9f..e31972a 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -187,7 +187,7 @@ class DTAS::SplitFX # :nodoc: comments.puts("#{k}=#{v}") end env["COMMENTS"] = "--comment-file=#{comments.path}" - env["INFILE"] = @infile + infile_env(env, @infile) env["OUTFMT"] = xs(outfmt.to_sox_arg) env["SUFFIX"] = outfmt.type env.merge!(t.env) @@ -342,4 +342,9 @@ class DTAS::SplitFX # :nodoc: require_relative 'cue_index' @cuebp = @tracks.map { |t| DTAS::CueIndex.new(1, "#{t.tstart}s") } end + + def infile_env(env, infile) + env["INFILE"] = infile + env["INDIR"], env["INBASE"] = File.split(File.expand_path(infile)) + end end |