dtas 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/Documentation/.gitignore +1 -1
  4. data/Documentation/GNUmakefile +1 -1
  5. data/Documentation/dtas-console.txt +1 -1
  6. data/Documentation/dtas-ctl.txt +1 -1
  7. data/Documentation/dtas-cueedit.txt +1 -1
  8. data/Documentation/dtas-enq.txt +1 -1
  9. data/Documentation/dtas-msinkctl.txt +1 -1
  10. data/Documentation/dtas-player.txt +1 -1
  11. data/Documentation/dtas-player_effects.txt +1 -1
  12. data/Documentation/dtas-player_protocol.txt +3 -3
  13. data/Documentation/dtas-player_sink_examples.txt +1 -1
  14. data/Documentation/dtas-sinkedit.txt +1 -1
  15. data/Documentation/dtas-sourceedit.txt +1 -1
  16. data/Documentation/dtas-splitfx.txt +1 -1
  17. data/Documentation/dtas-tl.txt +2 -1
  18. data/Documentation/dtas-xdelay.txt +1 -1
  19. data/GIT-VERSION-GEN +2 -2
  20. data/GNUmakefile +1 -1
  21. data/HACKING +1 -1
  22. data/INSTALL +5 -5
  23. data/README +1 -1
  24. data/Rakefile +2 -2
  25. data/TODO +1 -1
  26. data/bin/dtas-console +18 -3
  27. data/bin/dtas-ctl +1 -1
  28. data/bin/dtas-cueedit +1 -3
  29. data/bin/dtas-enq +2 -3
  30. data/bin/dtas-msinkctl +1 -1
  31. data/bin/dtas-partstats +1 -1
  32. data/bin/dtas-player +3 -4
  33. data/bin/dtas-sinkedit +1 -1
  34. data/bin/dtas-sourceedit +1 -1
  35. data/bin/dtas-splitfx +1 -1
  36. data/bin/dtas-tl +3 -3
  37. data/bin/dtas-xdelay +1 -1
  38. data/dtas-linux.gemspec +1 -1
  39. data/dtas-mpris.gemspec +1 -1
  40. data/dtas.gemspec +1 -1
  41. data/examples/trimfx.sample.yml +2 -5
  42. data/lib/dtas.rb +1 -1
  43. data/lib/dtas/buffer.rb +1 -1
  44. data/lib/dtas/buffer/read_write.rb +1 -1
  45. data/lib/dtas/buffer/splice.rb +1 -1
  46. data/lib/dtas/command.rb +1 -1
  47. data/lib/dtas/compat_onenine.rb +1 -1
  48. data/lib/dtas/compat_rbx.rb +1 -1
  49. data/lib/dtas/cue_index.rb +1 -1
  50. data/lib/dtas/disclaimer.rb +1 -1
  51. data/lib/dtas/edit_client.rb +1 -1
  52. data/lib/dtas/format.rb +1 -1
  53. data/lib/dtas/parse_time.rb +1 -1
  54. data/lib/dtas/partstats.rb +1 -1
  55. data/lib/dtas/pipe.rb +1 -1
  56. data/lib/dtas/player.rb +2 -2
  57. data/lib/dtas/player/client_handler.rb +5 -5
  58. data/lib/dtas/process.rb +1 -1
  59. data/lib/dtas/replaygain.rb +1 -1
  60. data/lib/dtas/rg_state.rb +1 -1
  61. data/lib/dtas/serialize.rb +1 -1
  62. data/lib/dtas/sigevent.rb +1 -1
  63. data/lib/dtas/sigevent/efd.rb +1 -1
  64. data/lib/dtas/sigevent/pipe.rb +1 -1
  65. data/lib/dtas/sink.rb +2 -2
  66. data/lib/dtas/source.rb +1 -1
  67. data/lib/dtas/source/av.rb +1 -1
  68. data/lib/dtas/source/av_ff_common.rb +1 -1
  69. data/lib/dtas/source/cmd.rb +1 -1
  70. data/lib/dtas/source/common.rb +1 -1
  71. data/lib/dtas/source/ff.rb +1 -1
  72. data/lib/dtas/source/file.rb +1 -1
  73. data/lib/dtas/source/mp3gain.rb +1 -1
  74. data/lib/dtas/source/sox.rb +1 -1
  75. data/lib/dtas/splitfx.rb +1 -1
  76. data/lib/dtas/state_file.rb +1 -1
  77. data/lib/dtas/tracklist.rb +1 -1
  78. data/lib/dtas/trimfx.rb +64 -3
  79. data/lib/dtas/unix_accepted.rb +3 -1
  80. data/lib/dtas/unix_client.rb +2 -2
  81. data/lib/dtas/unix_server.rb +8 -2
  82. data/lib/dtas/util.rb +1 -1
  83. data/lib/dtas/writable_iter.rb +1 -1
  84. data/lib/dtas/xs.rb +2 -2
  85. data/perl/dtas-graph +1 -1
  86. data/test/covshow.rb +1 -1
  87. data/test/helper.rb +24 -3
  88. data/test/player_integration.rb +1 -1
  89. data/test/test_buffer.rb +1 -1
  90. data/test/test_env.rb +1 -1
  91. data/test/test_format.rb +1 -1
  92. data/test/test_format_change.rb +1 -1
  93. data/test/test_player.rb +1 -1
  94. data/test/test_player_client_handler.rb +1 -1
  95. data/test/test_player_integration.rb +1 -1
  96. data/test/test_process.rb +1 -1
  97. data/test/test_rg_integration.rb +1 -1
  98. data/test/test_rg_state.rb +1 -1
  99. data/test/test_sink.rb +1 -1
  100. data/test/test_sink_pipe_size.rb +1 -1
  101. data/test/test_sink_tee_integration.rb +1 -1
  102. data/test/test_source_av.rb +1 -1
  103. data/test/test_source_sox.rb +1 -1
  104. data/test/test_splitfx.rb +8 -12
  105. data/test/test_tracklist.rb +1 -1
  106. data/test/test_trimfx.rb +33 -2
  107. data/test/test_unixserver.rb +1 -1
  108. data/test/test_util.rb +1 -1
  109. metadata +3 -5
  110. data/lib/dtas/fadefx.rb +0 -32
  111. data/test/test_fadefx.rb +0 -18
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require 'socket'
4
4
  require_relative '../dtas'
@@ -99,7 +99,13 @@ class DTAS::UNIXServer # :nodoc:
99
99
 
100
100
  def run_once
101
101
  # give IO.select one-shot behavior, snapshot and replace the watchlist
102
- r = IO.select(@readers.keys, @writers.keys) or return
102
+ begin
103
+ r = IO.select(@readers.keys, @writers.keys) or return
104
+ rescue IOError
105
+ # this only happens when sinks error out
106
+ @writers.delete_if { |io| io.to_io.closed? }
107
+ retry
108
+ end
103
109
  @hot_read = r[0]
104
110
  r[1].each do |io|
105
111
  @writers.delete(io)
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require_relative '../dtas'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require_relative '../dtas'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require_relative '../dtas'
4
4
  require 'shellwords'
@@ -9,6 +9,6 @@ require 'shellwords'
9
9
  # again, filesystems can use any byte value in names except '\0'.
10
10
  module DTAS::XS # :nodoc:
11
11
  def xs(ary)
12
- Shellwords.join(ary.map { |s| s.b })
12
+ Shellwords.join(ary.map(&:b))
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/perl -w
2
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
2
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
3
3
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
4
4
  use strict;
5
5
  use Graph::Easy; # for ASCII-art graphs
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  #
4
4
  # this works with the __covmerge method in test/helper.rb
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  $stdout.sync = $stderr.sync = Thread.abort_on_exception = true
4
4
  require 'thread'
@@ -25,6 +25,12 @@ if ENV["COVERAGE"]
25
25
  # filter out stuff that's not in our project
26
26
  COVMATCH =~ filename or next
27
27
 
28
+ # For compatibility with https://bugs.ruby-lang.org/issues/9508
29
+ # TODO: support those features if that gets merged into mainline
30
+ unless Array === counts
31
+ counts = counts[:lines]
32
+ end
33
+
28
34
  merge = prev[filename] || []
29
35
  merge = merge
30
36
  counts.each_with_index do |count, i|
@@ -44,14 +50,21 @@ if ENV["COVERAGE"]
44
50
  at_exit { __covmerge }
45
51
  end
46
52
 
47
- gem 'minitest'
53
+ begin
54
+ gem 'minitest'
55
+ rescue LoadError
56
+ end
48
57
  require 'minitest/autorun'
49
58
  require "tempfile"
50
59
 
51
60
  Testcase = begin
52
61
  Minitest::Test
53
62
  rescue NameError
54
- Minitest::Unit::TestCase
63
+ begin
64
+ Minitest::Unit::TestCase # minitest 4
65
+ rescue
66
+ MiniTest::Unit::TestCase # minitest 3
67
+ end
55
68
  end
56
69
 
57
70
  FIFOS = []
@@ -86,3 +99,11 @@ class Dir
86
99
  end
87
100
  end
88
101
  end unless Dir.respond_to?(:mktmpdir)
102
+
103
+ def guitar_pluck(outfile)
104
+ outfile =~ %r{\A[\w\./-]+\z} or raise ArgumentError, "bad chars"
105
+ cmd = '(for n in E2 A2 D3 G3 B3 E4; do '\
106
+ 'sox -n -ts32 -c2 -r44100 - synth 4 pluck $n; done ) | ' \
107
+ "sox -ts32 -c2 -r44100 - #{outfile}"
108
+ assert_equal(true, system(cmd), cmd)
109
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/player'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'stringio'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require_relative 'helper'
4
4
  require 'dtas/process'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'tempfile'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/player_integration'
4
4
  require 'tmpdir'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'tempfile'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/player'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/player_integration'
4
4
  class TestPlayerIntegration < Testcase
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/process'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/player_integration'
4
4
  class TestRgIntegration < Testcase
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/rg_state'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/sink'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  begin
4
4
  require 'io/splice'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/player_integration'
4
4
  class TestSinkTeeIntegration < Testcase
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/source/av'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/source/sox'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require 'yaml'
4
4
  require 'dtas/splitfx'
@@ -20,11 +20,7 @@ class TestSplitfx < Testcase
20
20
  sfx = DTAS::SplitFX.new
21
21
  Dir.mktmpdir do |dir|
22
22
  Dir.chdir(dir) do
23
- # create a guitar pluck
24
- cmd = '(for n in E2 A2 D3 G3 B3 E4; do '\
25
- 'sox -n -ts32 -c2 -r44100 - synth 4 pluck $n; done ) | ' \
26
- 'sox -ts32 -c2 -r44100 - foo.flac'
27
- assert system(cmd), cmd.inspect
23
+ guitar_pluck("foo.flac")
28
24
  sfx.import(hash, {})
29
25
  opts = { jobs: nil, silent: true }
30
26
 
@@ -65,13 +61,13 @@ class TestSplitfx < Testcase
65
61
  assert system(cmd), cmd
66
62
  assert_equal `soxi -D #{nr}.flac`, `soxi -D #{nr}.wav`
67
63
  end
68
- end
69
64
 
70
- # ensure 16/44.1kHz FLAC works (CDDA-like)
71
- File.unlink('1.flac', '2.flac')
72
- WAIT_ALL_MTX.synchronize { sfx.run("flac-cdda", opts) }
73
- %w(1 2).each do |nr|
74
- assert_equal `soxi -D #{nr}.flac`, `soxi -D #{nr}.wav`
65
+ # ensure 16/44.1kHz FLAC works (CDDA-like)
66
+ File.unlink('1.flac', '2.flac')
67
+ WAIT_ALL_MTX.synchronize { sfx.run("flac-cdda", opts) }
68
+ %w(1 2).each do |nr|
69
+ assert_equal `soxi -D #{nr}.flac`, `soxi -D #{nr}.wav`
70
+ end
75
71
  end
76
72
  end
77
73
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require_relative 'helper'
4
4
  require 'dtas/tracklist'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/trimfx'
@@ -45,6 +45,37 @@ class TestTrimFX < Testcase
45
45
 
46
46
  def test_tfx_effects
47
47
  tfx = DTAS::TrimFX.new(%w(trim 1 sox vol -1dB))
48
- assert_equal %w(sox $SOXIN $SOXOUT $TRIMFX vol -1dB $FADEFX), tfx.cmd
48
+ assert_equal %w(sox $SOXIN $SOXOUT $TRIMFX vol -1dB), tfx.cmd
49
+ end
50
+
51
+ def test_schedule_simple
52
+ fx = [
53
+ DTAS::TrimFX.new(%w(trim 1 0.3)),
54
+ DTAS::TrimFX.new(%w(trim 2 0.2)),
55
+ DTAS::TrimFX.new(%w(trim 0.5 0.5)),
56
+ ].shuffle
57
+ ary = DTAS::TrimFX.schedule(fx)
58
+ assert_operator 1, :==, ary.size
59
+ assert_equal [ 0.5, 1, 2 ], ary[0].map(&:tbeg)
60
+ assert_equal [ 0.5, 0.3, 0.2 ], ary[0].map(&:tlen)
61
+ end
62
+
63
+ def test_schedule_overlaps
64
+ fx = [
65
+ DTAS::TrimFX.new(%w(trim 1 0.3 sox)),
66
+ DTAS::TrimFX.new(%w(trim 1.1 0.2 sox)),
67
+ DTAS::TrimFX.new(%w(trim 0.5 0.5 sox)),
68
+ ]
69
+ ary = DTAS::TrimFX.schedule(fx)
70
+ assert_equal 2, ary.size
71
+ assert_equal [ 0.5, 1 ], ary[0].map(&:tbeg)
72
+ assert_equal [ 1.1 ], ary[1].map(&:tbeg)
73
+
74
+ ex = DTAS::TrimFX.expand(fx, 10)
75
+ assert_equal 2, ex.size
76
+ assert_equal 0, ex[0][0].tbeg
77
+ assert_equal 3, ex[0].size
78
+ assert_equal 0, ex[1][0].tbeg
79
+ assert_equal 3, ex[1].size
49
80
  end
50
81
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'tempfile'
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
1
+ # Copyright (C) 2013-2014, Eric Wong <e@80x24.org> and all contributors
2
2
  # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
3
  require './test/helper'
4
4
  require 'dtas/util'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dtas hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-30 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Free Software command-line tools for audio playback, mastering, and
@@ -89,7 +89,6 @@ files:
89
89
  - lib/dtas/cue_index.rb
90
90
  - lib/dtas/disclaimer.rb
91
91
  - lib/dtas/edit_client.rb
92
- - lib/dtas/fadefx.rb
93
92
  - lib/dtas/format.rb
94
93
  - lib/dtas/parse_time.rb
95
94
  - lib/dtas/partstats.rb
@@ -143,7 +142,6 @@ files:
143
142
  - test/player_integration.rb
144
143
  - test/test_buffer.rb
145
144
  - test/test_env.rb
146
- - test/test_fadefx.rb
147
145
  - test/test_format.rb
148
146
  - test/test_format_change.rb
149
147
  - test/test_player.rb
@@ -182,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
180
  version: '0'
183
181
  requirements: []
184
182
  rubyforge_project:
185
- rubygems_version: 2.2.0
183
+ rubygems_version: 2.4.2
186
184
  signing_key:
187
185
  specification_version: 4
188
186
  summary: duct tape audio suite for *nix
@@ -1,32 +0,0 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
2
- # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
- require_relative '../dtas'
4
- require_relative 'parse_time'
5
-
6
- class DTAS::FadeFX
7
- include DTAS::ParseTime
8
- attr_reader :out_prev, :in_main, :out_main, :in_next
9
- F = Struct.new(:type, :len)
10
-
11
- def initialize(args)
12
- args =~ /\Afade=([^,]*),([^,]*);([^,]*),([^,]*)\z/ or
13
- raise ArgumentError, "bad fade format"
14
- fades = [ $1, $2, $3, $4 ]
15
- %w(out_prev in_main out_main in_next).each do |iv|
16
- instance_variable_set("@#{iv}", parse!(fades.shift))
17
- end
18
- end
19
-
20
- # q - quarter of a sine wave
21
- # h - half a sine wave
22
- # t - linear (`triangular') slope
23
- # l - logarithmic
24
- # p - inverted parabola
25
- # default is 't' (sox defaults to 'l', but triangular makes more sense
26
- # when concatenating
27
- def parse!(str)
28
- type = "t"
29
- str.sub!(/\A([a-z])/, "") and type = $1
30
- F[type, parse_time(str)]
31
- end
32
- end
@@ -1,18 +0,0 @@
1
- # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
2
- # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
3
- require_relative 'helper'
4
- require 'dtas/fadefx'
5
-
6
- class TestFadeFX < Testcase
7
- def test_fadefx
8
- ffx = DTAS::FadeFX.new("fade=t1,t3.1;l4,t1")
9
- assert_equal 't', ffx.out_prev.type
10
- assert_equal 1, ffx.out_prev.len
11
- assert_equal 't', ffx.in_main.type
12
- assert_equal 3.1, ffx.in_main.len
13
- assert_equal 'l', ffx.out_main.type
14
- assert_equal 4, ffx.out_main.len
15
- assert_equal 't', ffx.in_next.type
16
- assert_equal 1, ffx.in_next.len
17
- end
18
- end