dtas 0.18.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/Documentation/dtas-splitfx.pod +36 -9
  3. data/Documentation/dtas-tl.pod +3 -1
  4. data/GIT-VERSION-FILE +1 -1
  5. data/GIT-VERSION-GEN +2 -2
  6. data/GNUmakefile +13 -1
  7. data/INSTALL +12 -11
  8. data/NEWS +90 -0
  9. data/README +5 -5
  10. data/bin/dtas-archive +6 -2
  11. data/bin/dtas-console +36 -4
  12. data/bin/dtas-msinkctl +2 -3
  13. data/bin/dtas-partstats +3 -9
  14. data/bin/dtas-player +1 -2
  15. data/bin/dtas-readahead +11 -25
  16. data/bin/dtas-sinkedit +3 -4
  17. data/bin/dtas-sourceedit +3 -4
  18. data/bin/dtas-splitfx +10 -5
  19. data/bin/dtas-tl +32 -27
  20. data/dtas.gemspec +3 -3
  21. data/dtas.sh +8 -0
  22. data/examples/splitfx.sample.yml +1 -1
  23. data/examples/tfx.sample.yml +1 -1
  24. data/lib/dtas/buffer/fiddle_splice.rb +2 -1
  25. data/lib/dtas/buffer/read_write.rb +1 -2
  26. data/lib/dtas/buffer/splice.rb +2 -1
  27. data/lib/dtas/buffer.rb +2 -2
  28. data/lib/dtas/edit_client.rb +2 -3
  29. data/lib/dtas/fadefx.rb +2 -2
  30. data/lib/dtas/mcache.rb +14 -3
  31. data/lib/dtas/mlib.rb +23 -13
  32. data/lib/dtas/partstats.rb +3 -5
  33. data/lib/dtas/pipe.rb +2 -3
  34. data/lib/dtas/pipeline.rb +1 -4
  35. data/lib/dtas/player/client_handler.rb +3 -3
  36. data/lib/dtas/player.rb +13 -12
  37. data/lib/dtas/process.rb +3 -5
  38. data/lib/dtas/rg_state.rb +2 -2
  39. data/lib/dtas/sigevent/fiddle_efd.rb +3 -4
  40. data/lib/dtas/sigevent/pipe.rb +2 -3
  41. data/lib/dtas/sink.rb +1 -2
  42. data/lib/dtas/source/av_ff_common.rb +4 -4
  43. data/lib/dtas/source/sox.rb +4 -4
  44. data/lib/dtas/source/splitfx.rb +2 -3
  45. data/lib/dtas/splitfx.rb +19 -9
  46. data/lib/dtas/state_file.rb +2 -2
  47. data/lib/dtas/track.rb +1 -1
  48. data/lib/dtas/unix_accepted.rb +12 -37
  49. data/lib/dtas/unix_client.rb +2 -2
  50. data/lib/dtas/unix_server.rb +2 -14
  51. data/lib/dtas/version.rb +1 -1
  52. data/lib/dtas/watchable/fiddle_ino.rb +3 -3
  53. data/lib/dtas/watchable.rb +1 -2
  54. data/lib/dtas.rb +6 -22
  55. data/man/dtas-archive.1 +1 -1
  56. data/man/dtas-console.1 +1 -1
  57. data/man/dtas-ctl.1 +1 -1
  58. data/man/dtas-cueedit.1 +1 -1
  59. data/man/dtas-enq.1 +1 -1
  60. data/man/dtas-env.7 +1 -1
  61. data/man/dtas-msinkctl.1 +1 -1
  62. data/man/dtas-player.1 +1 -1
  63. data/man/dtas-player_effects.7 +1 -1
  64. data/man/dtas-player_protocol.7 +1 -1
  65. data/man/dtas-player_sink_examples.7 +1 -1
  66. data/man/dtas-sinkedit.1 +1 -1
  67. data/man/dtas-sourceedit.1 +1 -1
  68. data/man/dtas-splitfx.1 +38 -13
  69. data/man/dtas-tl.1 +4 -2
  70. data/man/dtas-xdelay.1 +1 -1
  71. data/{perl → script}/dtas-graph +1 -1
  72. data/test/player_integration.rb +1 -2
  73. data/test/test_buffer.rb +2 -2
  74. data/test/test_encoding.rb +2 -3
  75. data/test/test_format_change.rb +2 -2
  76. data/test/test_mcache.rb +15 -5
  77. data/test/test_player_client_handler.rb +2 -2
  78. data/test/test_player_integration.rb +7 -8
  79. data/test/test_rg_integration.rb +9 -9
  80. data/test/test_sink.rb +2 -2
  81. data/test/test_splitfx.rb +2 -5
  82. data/test/test_tfx.rb +2 -3
  83. data/test/test_unixserver.rb +1 -1
  84. metadata +6 -8
  85. data/lib/dtas/compat_onenine.rb +0 -17
  86. data/lib/dtas/nonblock.rb +0 -24
  87. data/lib/dtas/spawn_fix.rb +0 -10
@@ -133,7 +133,7 @@
133
133
  .\" ========================================================================
134
134
  .\"
135
135
  .IX Title "DTAS-SOURCEEDIT 1"
136
- .TH DTAS-SOURCEEDIT 1 "1994-10-02" "dtas 0.18.1" "dtas user manual"
136
+ .TH DTAS-SOURCEEDIT 1 "1994-10-02" "dtas 0.21.0" "dtas user manual"
137
137
  .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138
138
  .\" way too many mistakes in technical documents.
139
139
  .if n .ad l
data/man/dtas-splitfx.1 CHANGED
@@ -133,7 +133,7 @@
133
133
  .\" ========================================================================
134
134
  .\"
135
135
  .IX Title "DTAS-SPLITFX 1"
136
- .TH DTAS-SPLITFX 1 "1994-10-02" "dtas 0.18.1" "dtas user manual"
136
+ .TH DTAS-SPLITFX 1 "1994-10-02" "dtas 0.21.0" "dtas user manual"
137
137
  .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138
138
  .\" way too many mistakes in technical documents.
139
139
  .if n .ad l
@@ -158,7 +158,8 @@ to use \fBecasound\fR\|(1), too.
158
158
  .IP "\-j, \-\-jobs [\s-1JOBS\s0]" 4
159
159
  .IX Item "-j, --jobs [JOBS]"
160
160
  Number of jobs to run in parallel. If no number is specified, all
161
- jobs are run in parallel.
161
+ jobs are run in parallel. Default: number of \s-1CPUS\s0 (dtas 0.20.0+),
162
+ previous versions of dtas defaulted to 1.
162
163
  .IP "\-n, \-\-dry\-run" 4
163
164
  .IX Item "-n, --dry-run"
164
165
  Print, but do not run the commands to be executed
@@ -198,6 +199,15 @@ This bypasses the \*(L"tracks\*(R" section and of the \s-1YAML\s0 file and
198
199
  outputs the result as a single file with the \s-1TRACKNUMBER\s0
199
200
  of \*(L"000\*(R". For ease-of-typing, commas in this command-line
200
201
  argument are automatically expanded to spaces when passed to sox.
202
+ .Sp
203
+ This switch may not be combined with \*(L"\-\-filter\*(R"
204
+ .IP "\-f, \-\-filter [FIELD=]VALUE" 4
205
+ .IX Item "-f, --filter [FIELD=]VALUE"
206
+ Only process tracks matching a given comment \s-1FIELD\s0 and \s-1VALUE.\s0
207
+ If no \f(CW\*(C`=\*(C'\fR is exists, then all comment fields are matched
208
+ against the specified \s-1VALUE.\s0
209
+ .Sp
210
+ This switch may not be combined with \*(L"\-\-trim\*(R"
201
211
  .IP "\-p, \-\-sox\-pipe" 4
202
212
  .IX Item "-p, --sox-pipe"
203
213
  Used in place of an output target to specify outputting audio data in
@@ -208,11 +218,11 @@ moves printing of output to stderr and disables parallel job invocation.
208
218
  .IP "infile \- string, the pathname of the original audio file" 4
209
219
  .IX Item "infile - string, the pathname of the original audio file"
210
220
  .PD 0
211
- .IP "env \- ordered hash of environment variables to set for all commands" 4
212
- .IX Item "env - ordered hash of environment variables to set for all commands"
221
+ .IP "env \- hash of environment variables to set for all commands" 4
222
+ .IX Item "env - hash of environment variables to set for all commands"
213
223
  .PD
214
224
  .Vb 2
215
- \& env: !omap
225
+ \& env:
216
226
  \& FX: gain 3 stats
217
227
  .Ve
218
228
  .IP "comments \- hash of common tags for all audio (e.g. \s-1ARTIST, ALBUM, YEAR\s0)" 4
@@ -242,19 +252,34 @@ highest-numbered track. Default: true
242
252
  .ie n .IP "targets \- hash, see ""\s-1TARGETS""\s0 section" 4
243
253
  .el .IP "targets \- hash, see ``\s-1TARGETS''\s0 section" 4
244
254
  .IX Item "targets - hash, see TARGETS section"
245
- .IP "command \- used only by \fBdtas\-player\fR\|(1)" 4
246
- .IX Item "command - used only by dtas-player"
255
+ .IP "command \- override the default sox invocation" 4
256
+ .IX Item "command - override the default sox invocation"
247
257
  .PD
258
+ This command may be used to specify an alternate command to process each
259
+ track.
260
+ .Sp
261
+ Default: sox \*(L"$INFILE\*(R" \f(CW$COMMENTS\fR \f(CW$OUTFMT\fR \f(CW$OUTDST\fR \f(CW$TRIMFX\fR \f(CW$FX\fR \f(CW$RATEFX\fR \f(CW$DITHERFX\fR
248
262
  .SH "TRACKS"
249
263
  .IX Header "TRACKS"
250
264
  Tracks may be defined by a start time, with the stop time defined
251
265
  automatically by the start of the next track, stop time, or a skip
252
266
  segment.
253
- .IP "t \s-1TIME TITLE\s0 [fade_in/fade_out=FADE_ARGS]" 4
254
- .IX Item "t TIME TITLE [fade_in/fade_out=FADE_ARGS]"
255
- The start of a new track
256
- at \s-1TIME\s0 with \s-1TITLE.\s0 An optional fade_in and fade_out may be specified
257
- for the first/last tracks.
267
+ .IP "t \s-1TIME TITLE\s0 [fade_in/fade_out=FADE_ARGS] [.FIELD=VALUE] [env.X=Y]" 4
268
+ .IX Item "t TIME TITLE [fade_in/fade_out=FADE_ARGS] [.FIELD=VALUE] [env.X=Y]"
269
+ The start of a new track at \s-1TIME\s0 with \s-1TITLE.\s0
270
+ An optional \*(L"fade_in\*(R" and \*(L"fade_out\*(R" may be specified for any tracks.
271
+ Per-track comments may be specified in the form of \f(CW\*(C`.FIELD=VALUE\*(C'\fR.
272
+ Using per-track \f(CW\*(C`.ARTIST=FOO\*(C'\fR allows proper tagging of multi-artist
273
+ compilations.
274
+ .Sp
275
+ Per-track environment variables may be specified in the form
276
+ of \f(CW\*(C`env.K=V\*(C'\fR where \f(CW\*(C`K\*(C'\fR is the environment variable name and
277
+ \&\f(CW\*(C`V\*(C'\fR is its value. Per-track environment variables do not affect
278
+ playback of \s-1YAML\s0 files via \fBdtas\-player\fR\|(1) nor use of the \*(L"\-\-trim\*(R"
279
+ command-line option. However, per-track environment variables do affect
280
+ any tracks written to the filesystem, including those using the \*(L"\-\-filter\*(R"
281
+ switch. These environment variables are intended to affect the specified
282
+ \&\*(L"command\*(R" or default \fBsox\fR\|(1) invocation.
258
283
  .IP "skip \s-1TIME\s0 \- skip a segment starting at \s-1TIME\s0" 4
259
284
  .IX Item "skip TIME - skip a segment starting at TIME"
260
285
  \&\*(L"skip\*(R" segments are
@@ -374,7 +399,7 @@ imbalance in a live concert recording from the audience:
374
399
  .Ve
375
400
  .SH "COPYRIGHT"
376
401
  .IX Header "COPYRIGHT"
377
- Copyright 2013\-2020 all contributors <mailto:dtas\-all@nongnu.org>
402
+ Copyright all contributors <mailto:dtas\-all@nongnu.org>
378
403
  .PP
379
404
  License: \s-1GPL\-3.0+\s0 <https://www.gnu.org/licenses/gpl\-3.0.txt>
380
405
  .SH "SEE ALSO"
data/man/dtas-tl.1 CHANGED
@@ -133,7 +133,7 @@
133
133
  .\" ========================================================================
134
134
  .\"
135
135
  .IX Title "DTAS-TL 1"
136
- .TH DTAS-TL 1 "1994-10-02" "dtas 0.18.1" "dtas user manual"
136
+ .TH DTAS-TL 1 "1994-10-02" "dtas 0.21.0" "dtas user manual"
137
137
  .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138
138
  .\" way too many mistakes in technical documents.
139
139
  .if n .ad l
@@ -195,6 +195,8 @@ optionally seek to \s-1POS.\s0 \s-1POS\s0 should be a timestamp in \s-1HH:MM:SS
195
195
  .PD 0
196
196
  .IP "prev \- play the previous track in the tracklist" 4
197
197
  .IX Item "prev - play the previous track in the tracklist"
198
+ .IP "prune \- cull non-existent pathnames from the tracklist" 4
199
+ .IX Item "prune - cull non-existent pathnames from the tracklist"
198
200
  .IP "repeat 1 \- repeat the current track" 4
199
201
  .IX Item "repeat 1 - repeat the current track"
200
202
  .IP "repeat false \- disable repeat" 4
@@ -258,7 +260,7 @@ and <https://lists.gnu.org/archive/html/dtas\-all/>
258
260
  No subscription is necessary to post to the mailing list.
259
261
  .SH "COPYRIGHT"
260
262
  .IX Header "COPYRIGHT"
261
- Copyright 2013\-2020 all contributors <mailto:dtas\-all@nongnu.org>
263
+ Copyright all contributors <mailto:dtas\-all@nongnu.org>
262
264
  .PP
263
265
  License: \s-1GPL\-3.0+\s0 <https://www.gnu.org/licenses/gpl\-3.0.txt>
264
266
  .SH "SEE ALSO"
data/man/dtas-xdelay.1 CHANGED
@@ -133,7 +133,7 @@
133
133
  .\" ========================================================================
134
134
  .\"
135
135
  .IX Title "DTAS-XDELAY 1"
136
- .TH DTAS-XDELAY 1 "1994-10-02" "dtas 0.18.1" "dtas user manual"
136
+ .TH DTAS-XDELAY 1 "1994-10-02" "dtas 0.21.0" "dtas user manual"
137
137
  .\" For nroff, turn off justification. Always turn off hyphenation; it makes
138
138
  .\" way too many mistakes in technical documents.
139
139
  .if n .ad l
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/perl -w
2
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
2
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
3
3
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
4
4
  #
5
5
  # Process visualizer which shows pipe connections between processes with
@@ -1,11 +1,10 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
5
5
  require 'dtas/player'
6
6
  require 'dtas/state_file'
7
7
  require 'dtas/unix_client'
8
- require 'yaml'
9
8
  require 'tempfile'
10
9
  require 'shellwords'
11
10
  require 'timeout'
data/test/test_buffer.rb CHANGED
@@ -11,7 +11,7 @@ class TestBuffer < Testcase
11
11
  @@max_size = nil if @@max_size == 0
12
12
 
13
13
  def teardown
14
- @to_close.each { |io| io.close unless io.closed? }
14
+ @to_close.each(&:close)
15
15
  end
16
16
 
17
17
  def setup
@@ -62,7 +62,7 @@ class TestBuffer < Testcase
62
62
  buf = new_buffer
63
63
  r, w = IO.pipe
64
64
  buf.wr.write "HIHI"
65
- assert_equal :wait_readable, buf.broadcast([w])
65
+ assert_equal [w], buf.broadcast([w])
66
66
  assert_equal 4, buf.bytes_xfer
67
67
  tmp = [w]
68
68
  r.close
@@ -1,9 +1,8 @@
1
- # Copyright (C) 2018-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
5
5
  require 'dtas'
6
- require 'yaml'
7
6
 
8
7
  class TestEncoding < Testcase
9
8
  def test_encoding
@@ -13,7 +12,7 @@ comments:
13
12
  ARTIST: !binary |-
14
13
  RW5yaXF1ZSBSb2Ryw61ndWV6
15
14
  EOD
16
- hash = YAML.load(data)
15
+ hash = DTAS.yaml_load(data)
17
16
  artist = DTAS.try_enc(hash['comments']['ARTIST'], Encoding::UTF_8)
18
17
  assert_equal 'Enrique Rodríguez', artist
19
18
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/player_integration'
@@ -26,7 +26,7 @@ class TestFormatChange < Testcase
26
26
 
27
27
  Timeout.timeout(len) do
28
28
  begin
29
- cur = YAML.load(s.req("current"))
29
+ cur = DTAS.yaml_load(s.req("current"))
30
30
  end while cur["sinks"] && sleep(0.01)
31
31
  end
32
32
 
data/test/test_mcache.rb CHANGED
@@ -1,19 +1,29 @@
1
- # Copyright (C) 2016-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
5
5
  require 'dtas/mcache'
6
+ require 'tempfile'
6
7
 
7
8
  class TestMcache < Testcase
8
9
  def test_mcache
10
+ tmp = Tempfile.new(%W(tmp .sox))
11
+ fn = tmp.path
12
+ cmd = %W(sox -r 44100 -b 16 -c 2 -n #{fn} trim 0 1)
13
+ system(*cmd) or skip
9
14
  mc = DTAS::Mcache.new
10
15
  exist = nil
11
- mc.lookup('hello') { |infile, hash| exist = hash }
16
+ mc.lookup(fn) { |infile, hash|
17
+ hash[:ctime] = File.stat(infile).ctime
18
+ exist = hash
19
+ }
12
20
  assert_kind_of Hash, exist
13
- assert_equal 'hello', exist[:infile]
21
+ assert_equal fn, exist[:infile]
14
22
  assert_operator exist[:btime], :<=, DTAS.now
15
- assert_same exist, mc.lookup('hello')
23
+ assert_same exist, mc.lookup(fn)
16
24
  assert_nil mc.lookup('HELLO')
17
- assert_same exist, mc.lookup('hello'), 'no change after miss'
25
+ assert_same exist, mc.lookup(fn), 'no change after miss'
26
+ ensure
27
+ tmp.close!
18
28
  end
19
29
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
@@ -71,7 +71,7 @@ class TestPlayerClientHandler < Testcase
71
71
  @sinks["default"] = sink
72
72
  dpc_sink(@io, %W(cat default))
73
73
  assert_equal 1, @io.size
74
- hsh = YAML.load(@io[0])
74
+ hsh = DTAS.yaml_load(@io[0])
75
75
  assert_kind_of Hash, hsh
76
76
  assert_equal "default", hsh["name"]
77
77
  assert_match("dither -s", hsh["command"])
@@ -1,10 +1,9 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/player_integration'
5
5
  class TestPlayerIntegration < Testcase
6
6
  include PlayerIntegration
7
- include DTAS::SpawnFix
8
7
 
9
8
  def test_cmd_rate
10
9
  env = ENV.to_hash.merge(@fmt.to_env)
@@ -140,7 +139,7 @@ class TestPlayerIntegration < Testcase
140
139
  Timeout.timeout(5) do
141
140
  begin
142
141
  yaml = s.req("current")
143
- cur = YAML.load(yaml)
142
+ cur = DTAS.yaml_load(yaml)
144
143
  end while cur["sinks"] && sleep(0.01)
145
144
  end
146
145
 
@@ -167,7 +166,7 @@ class TestPlayerIntegration < Testcase
167
166
  Timeout.timeout(len) do
168
167
  begin
169
168
  yaml = s.req("current")
170
- cur = YAML.load(yaml)
169
+ cur = DTAS.yaml_load(yaml)
171
170
  end while cur["sinks"] && sleep(0.01)
172
171
  end
173
172
  assert(system("cmp", dump.path, expect.path),
@@ -196,13 +195,13 @@ class TestPlayerIntegration < Testcase
196
195
  state.close!
197
196
  s = client_socket
198
197
  s.req_ok(%W(state dump #{state_path}))
199
- hash = YAML.load(IO.binread(state_path))
198
+ hash = DTAS.yaml_load(IO.binread(state_path))
200
199
  assert_equal @sock_path, hash["socket"]
201
200
  assert_equal "default", hash["sinks"][0]["name"]
202
201
 
203
202
  assert_equal "", IO.binread(@state_tmp.path)
204
203
  s.req_ok(%W(state dump))
205
- orig = YAML.load(IO.binread(@state_tmp.path))
204
+ orig = DTAS.yaml_load(IO.binread(@state_tmp.path))
206
205
  assert_equal orig, hash
207
206
  ensure
208
207
  File.unlink(state_path)
@@ -217,11 +216,11 @@ class TestPlayerIntegration < Testcase
217
216
  assert_equal "sox av ff splitfx", s.req("source ls")
218
217
 
219
218
  s.req_ok("source ed sox command=true")
220
- sox = YAML.load(s.req("source cat sox"))
219
+ sox = DTAS.yaml_load(s.req("source cat sox"))
221
220
  assert_equal "true", sox["command"]
222
221
 
223
222
  s.req_ok("source ed sox command=")
224
- sox = YAML.load(s.req("source cat sox"))
223
+ sox = DTAS.yaml_load(s.req("source cat sox"))
225
224
  assert_equal DTAS::Source::Sox::SOX_DEFAULTS["command"], sox["command"]
226
225
  end
227
226
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/player_integration'
@@ -39,7 +39,7 @@ class TestRgIntegration < Testcase
39
39
  yaml = cur = nil
40
40
  Timeout.timeout(5) do
41
41
  begin
42
- cur = YAML.load(yaml = s.req("current"))
42
+ cur = DTAS.yaml_load(yaml = s.req("current"))
43
43
  end while cur["current_offset"] == 0 && sleep(0.01)
44
44
  end
45
45
 
@@ -55,7 +55,7 @@ class TestRgIntegration < Testcase
55
55
  Timeout.timeout(5) do
56
56
  begin
57
57
  yaml = s.req("current")
58
- cur = YAML.load(yaml)
58
+ cur = DTAS.yaml_load(yaml)
59
59
  end while cur["current"]["env"]["RGFX"] !~ expect && sleep(0.01)
60
60
  end
61
61
  assert_match expect, cur["current"]["env"]["RGFX"]
@@ -67,27 +67,27 @@ class TestRgIntegration < Testcase
67
67
  check_gain.call(%r{gain 2\.5}, "track_peak")
68
68
 
69
69
  s.req_ok("rg preamp+=1")
70
- rg = YAML.load(yaml = s.req("rg"))
70
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
71
71
  assert_equal 1, rg["preamp"]
72
72
 
73
73
  s.req_ok("rg preamp-=1")
74
- rg = YAML.load(yaml = s.req("rg"))
74
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
75
75
  assert_nil rg["preamp"]
76
76
 
77
77
  s.req_ok("rg preamp=2")
78
- rg = YAML.load(yaml = s.req("rg"))
78
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
79
79
  assert_equal 2, rg["preamp"]
80
80
 
81
81
  s.req_ok("rg preamp-=0.3")
82
- rg = YAML.load(yaml = s.req("rg"))
82
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
83
83
  assert_equal 1.7, rg["preamp"]
84
84
 
85
85
  s.req_ok("rg preamp-=-0.3")
86
- rg = YAML.load(yaml = s.req("rg"))
86
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
87
87
  assert_equal 2.0, rg["preamp"]
88
88
 
89
89
  s.req_ok("rg preamp-=+0.3")
90
- rg = YAML.load(yaml = s.req("rg"))
90
+ rg = DTAS.yaml_load(yaml = s.req("rg"))
91
91
  assert_equal 1.7, rg["preamp"]
92
92
 
93
93
  dethrottle_decoder(s)
data/test/test_sink.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
@@ -27,6 +27,6 @@ class TestSink < Testcase
27
27
  def test_inactive_load
28
28
  orig = { "active" => false }.freeze
29
29
  tmp = orig.to_yaml
30
- assert_equal orig, YAML.load(tmp)
30
+ assert_equal orig, DTAS.yaml_load(tmp)
31
31
  end
32
32
  end
data/test/test_splitfx.rb CHANGED
@@ -1,14 +1,11 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
- require 'yaml'
5
4
  require 'dtas/splitfx'
6
5
  require 'thread'
7
6
  require_relative 'helper'
8
7
 
9
8
  class TestSplitfx < Testcase
10
- include DTAS::SpawnFix
11
-
12
9
  def tmp_err(path)
13
10
  err = $stderr.dup
14
11
  $stderr.reopen(path, 'a')
@@ -41,7 +38,7 @@ class TestSplitfx < Testcase
41
38
  end
42
39
 
43
40
  def test_example
44
- hash = YAML.load(File.read("examples/splitfx.sample.yml"))
41
+ hash = DTAS.yaml_load(File.read("examples/splitfx.sample.yml"))
45
42
  sfx = DTAS::SplitFX.new
46
43
  Dir.mktmpdir do |dir|
47
44
  Dir.chdir(dir) do
data/test/test_tfx.rb CHANGED
@@ -1,10 +1,9 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
1
+ # Copyright (C) all contributors <dtas-all@nongnu.org>
2
2
  # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
3
  # frozen_string_literal: true
4
4
  require './test/helper'
5
5
  require 'dtas/tfx'
6
6
  require 'dtas/format'
7
- require 'yaml'
8
7
 
9
8
  class TestTFX < Testcase
10
9
  def rate
@@ -12,7 +11,7 @@ class TestTFX < Testcase
12
11
  end
13
12
 
14
13
  def test_example
15
- ex = YAML.load(File.read("examples/tfx.sample.yml"))
14
+ ex = DTAS.yaml_load(File.read("examples/tfx.sample.yml"))
16
15
  effects = []
17
16
  ex["effects"].each do |line|
18
17
  words = Shellwords.split(line)
@@ -21,7 +21,7 @@ class TestUNIXServer < Testcase
21
21
  end
22
22
 
23
23
  def teardown
24
- @clients.each { |io| io.close unless io.closed? }
24
+ @clients.each(&:close)
25
25
  if File.exist?(@tmp.path)
26
26
  @tmp.close!
27
27
  else
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.18.1
4
+ version: 0.21.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: 2021-02-13 00:00:00.000000000 Z
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Free Software command-line tools for audio playback, mastering, and
@@ -86,6 +86,7 @@ files:
86
86
  - dtas-linux.gemspec
87
87
  - dtas-mpris.gemspec
88
88
  - dtas.gemspec
89
+ - dtas.sh
89
90
  - examples/README
90
91
  - examples/splitfx.sample.yml
91
92
  - examples/tfx.sample.yml
@@ -108,7 +109,6 @@ files:
108
109
  - lib/dtas/buffer/read_write.rb
109
110
  - lib/dtas/buffer/splice.rb
110
111
  - lib/dtas/command.rb
111
- - lib/dtas/compat_onenine.rb
112
112
  - lib/dtas/cue_index.rb
113
113
  - lib/dtas/disclaimer.rb
114
114
  - lib/dtas/edit_client.rb
@@ -118,7 +118,6 @@ files:
118
118
  - lib/dtas/mcache.rb
119
119
  - lib/dtas/mlib.rb
120
120
  - lib/dtas/mlib/migrations/0001_initial.rb
121
- - lib/dtas/nonblock.rb
122
121
  - lib/dtas/parse_freq.rb
123
122
  - lib/dtas/parse_time.rb
124
123
  - lib/dtas/partstats.rb
@@ -145,7 +144,6 @@ files:
145
144
  - lib/dtas/source/mp3gain.rb
146
145
  - lib/dtas/source/sox.rb
147
146
  - lib/dtas/source/splitfx.rb
148
- - lib/dtas/spawn_fix.rb
149
147
  - lib/dtas/splitfx.rb
150
148
  - lib/dtas/state_file.rb
151
149
  - lib/dtas/tfx.rb
@@ -177,7 +175,7 @@ files:
177
175
  - man/dtas-splitfx.1
178
176
  - man/dtas-tl.1
179
177
  - man/dtas-xdelay.1
180
- - perl/dtas-graph
178
+ - script/dtas-graph
181
179
  - setup.rb
182
180
  - test/covshow.rb
183
181
  - test/helper.rb
@@ -221,14 +219,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
219
  requirements:
222
220
  - - ">="
223
221
  - !ruby/object:Gem::Version
224
- version: 1.9.3
222
+ version: '2.3'
225
223
  required_rubygems_version: !ruby/object:Gem::Requirement
226
224
  requirements:
227
225
  - - ">="
228
226
  - !ruby/object:Gem::Version
229
227
  version: '0'
230
228
  requirements: []
231
- rubygems_version: 3.1.0.pre3
229
+ rubygems_version: 3.0.2
232
230
  signing_key:
233
231
  specification_version: 4
234
232
  summary: duct tape audio suite for *nix
@@ -1,17 +0,0 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
-
4
- # Make Ruby 1.9.3 look like Ruby 2.0.0 to us
5
- # This exists for Debian wheezy users using the stock Ruby 1.9.3 install.
6
- # We'll drop this interface when Debian wheezy (7.0) becomes unsupported.
7
- class String # :nodoc:
8
- def b # :nodoc:
9
- dup.force_encoding(Encoding::BINARY)
10
- end
11
- end unless String.method_defined?(:b)
12
-
13
- def IO # :nodoc:
14
- def self.pipe # :nodoc:
15
- super.each { |io| io.close_on_exec = true }
16
- end
17
- end if RUBY_VERSION.to_f <= 1.9
data/lib/dtas/nonblock.rb DELETED
@@ -1,24 +0,0 @@
1
- # Copyright (C) 2015-2020 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
-
4
- class DTAS::Nonblock < IO # :nodoc:
5
- if RUBY_VERSION.to_f <= 2.0
6
- EX = {}.freeze
7
- def read_nonblock(len, buf = nil, opts = EX)
8
- super(len, buf)
9
- rescue IO::WaitReadable
10
- raise if opts[:exception]
11
- :wait_readable
12
- rescue EOFError
13
- raise if opts[:exception]
14
- nil
15
- end
16
-
17
- def write_nonblock(buf, opts = EX)
18
- super(buf)
19
- rescue IO::WaitWritable
20
- raise if opts[:exception]
21
- :wait_writable
22
- end
23
- end
24
- end
@@ -1,10 +0,0 @@
1
- # Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
2
- # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3
- # workaround for older Rubies: https://bugs.ruby-lang.org/issues/8770
4
- module DTAS::SpawnFix # :nodoc:
5
- def spawn(*args)
6
- super(*args)
7
- rescue Errno::EINTR
8
- retry
9
- end if RUBY_VERSION.to_f <= 2.1
10
- end