dtas 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Documentation/dtas-splitfx.pod +6 -0
- data/GIT-VERSION-GEN +1 -1
- data/INSTALL +8 -7
- data/README +6 -1
- data/bin/dtas-console +14 -13
- data/bin/dtas-splitfx +7 -0
- data/lib/dtas/encoding.rb +7 -8
- data/lib/dtas/player/client_handler.rb +22 -14
- data/lib/dtas/splitfx.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e243e5ce687818e957241adc639e6a0557d6b4caff54fe423241a30cfbd0368f
|
4
|
+
data.tar.gz: 54d936c09a7ca62d97ce41f23e9c3db70b92765cea257cc34f7bbd21059ba938
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 937e5a36a9fcfe06011871c047a6cda9a8d402a3fea84a68a7214315e9228db03d8f7277d29adca0139ccc7358897a4985d606a96c156432ce53cba1a51fd801
|
7
|
+
data.tar.gz: 9aaed956fd48e6b5c0d45c0ef91a440bd6c4f53def5bfa5390ea5bd2315686dc199e0c0c007e2c1d8c2992bf9c386d3991b7c6fd183577f4e00bda860c09cf36
|
@@ -41,6 +41,12 @@ Silent operation, commands are not printed as executed
|
|
41
41
|
Disable automatic setting of the DITHERFX env. This also passes
|
42
42
|
the option to L<sox(1)> via SOX_OPTS.
|
43
43
|
|
44
|
+
=item -E, --err-suffix SUFFIX
|
45
|
+
|
46
|
+
Write the contents of C<stderr>. This is useful for capturing
|
47
|
+
the per-track output of the L<sox(1)> C<stats> effect when
|
48
|
+
combined with parallel C<--jobs>.
|
49
|
+
|
44
50
|
=item -O, --outdir OUTDIR
|
45
51
|
|
46
52
|
Set output directory instead of current directory.
|
data/GIT-VERSION-GEN
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2013-
|
2
|
+
# Copyright (C) 2013-2021 all contributors <dtas-all@nongnu.org>
|
3
3
|
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
CONSTANT = "DTAS::VERSION"
|
data/INSTALL
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Uncommon for audio software, dtas is implemented in Ruby.
|
1
|
+
Uncommon for audio software, dtas is currently implemented in Ruby.
|
2
2
|
|
3
3
|
The latest stable release or development snapshot of Ruby is recommended.
|
4
4
|
However, Ruby 1.9.3 and later works, but older versions of Ruby do not.
|
@@ -8,13 +8,14 @@ dtas-player uses SoX by default and you will need it unless you've
|
|
8
8
|
reconfigured dtas-player to use something else.
|
9
9
|
|
10
10
|
mp3gain is required if you want to use ReplayGain with MP3s
|
11
|
+
(it is no longer in new versions of Debian)
|
11
12
|
|
12
13
|
If you only intend to use dtas-cueedit, you will need metaflac(1) from
|
13
14
|
the FLAC package.
|
14
15
|
|
15
|
-
Debian
|
16
|
+
Debian 10+ users can install dependencies easily:
|
16
17
|
|
17
|
-
sudo apt-get install sox libsox-fmt-all
|
18
|
+
sudo apt-get install sox libsox-fmt-all flac ruby-dev ruby-charlock-holmes
|
18
19
|
|
19
20
|
For future upgrades of dtas
|
20
21
|
|
@@ -28,10 +29,10 @@ For future upgrades of dtas
|
|
28
29
|
|
29
30
|
Grab the latest tarball from our HTTPS site:
|
30
31
|
|
31
|
-
https://80x24.org/dtas/
|
32
|
+
https://80x24.org/dtas/2021/dtas-0.18.1.tar.gz
|
32
33
|
|
33
|
-
$ tar zxvf dtas-0.18.
|
34
|
-
$ cd dtas-0.18.
|
34
|
+
$ tar zxvf dtas-0.18.1.tar.gz
|
35
|
+
$ cd dtas-0.18.1
|
35
36
|
$ sudo ruby setup.rb
|
36
37
|
|
37
38
|
GNU/Linux users may optionally install the "sleepy_penguin" RubyGem
|
@@ -49,5 +50,5 @@ No subscription is necessary to post to the mailing list.
|
|
49
50
|
|
50
51
|
# COPYRIGHT
|
51
52
|
|
52
|
-
Copyright 2013-
|
53
|
+
Copyright 2013-2021 all contributors <dtas-all@nongnu.org>
|
53
54
|
License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
data/README
CHANGED
@@ -82,8 +82,13 @@ Mailing list archives available at <https://80x24.org/dtas-all/> or
|
|
82
82
|
No subscription is necessary to post to the mailing list.
|
83
83
|
You may also read via:
|
84
84
|
NNTP: <nntp://news.public-inbox.org/inbox.comp.audio.dtas>
|
85
|
-
<nntp://
|
85
|
+
<nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas>
|
86
|
+
<nntp://news.gmane.io/gmane.comp.audio.dtas.general>
|
87
|
+
IMAP: <imaps://anon:mous@public-inbox.org/inbox.comp.audio.dtas.0>
|
88
|
+
<imap://anon:mous@ou63pmih66umazou.onion/inbox.comp.audio.dtas.0>
|
86
89
|
Atom: <https://80x24.org/dtas-all/new.atom>
|
90
|
+
<http://ou63pmih66umazou.onion/dtas-all/new.atom>
|
91
|
+
(.onion URLs require Tor: <https://www.torproject.org/>)
|
87
92
|
|
88
93
|
## Copyright
|
89
94
|
|
data/bin/dtas-console
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2013-
|
2
|
+
# Copyright (C) 2013-2021 all contributors <dtas-all@nongnu.org>
|
3
3
|
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
#
|
@@ -112,7 +112,8 @@ def rg_string(rg, current)
|
|
112
112
|
rv
|
113
113
|
end
|
114
114
|
|
115
|
-
def may_fail(
|
115
|
+
def may_fail(c, req, events)
|
116
|
+
res = c.req(req)
|
116
117
|
events << res if res != "OK"
|
117
118
|
end
|
118
119
|
|
@@ -227,17 +228,17 @@ def may_fail(res, events)
|
|
227
228
|
when $stdin
|
228
229
|
# keybindings taken from mplayer / vi
|
229
230
|
case key = Curses.getch
|
230
|
-
when "j" then c
|
231
|
-
when "k" then c
|
231
|
+
when "j" then may_fail(c, "seek -5", events)
|
232
|
+
when "k" then may_fail(c, "seek +5", events)
|
232
233
|
when "q" then exit(0)
|
233
|
-
when Curses::KEY_DOWN then c
|
234
|
-
when Curses::KEY_UP then c
|
235
|
-
when Curses::KEY_LEFT then c
|
236
|
-
when Curses::KEY_RIGHT then c
|
237
|
-
when Curses::KEY_BACKSPACE then c
|
234
|
+
when Curses::KEY_DOWN then may_fail(c, "seek -60", events)
|
235
|
+
when Curses::KEY_UP then may_fail(c, "seek +60", events)
|
236
|
+
when Curses::KEY_LEFT then may_fail(c, "seek -10", events)
|
237
|
+
when Curses::KEY_RIGHT then may_fail(c, "seek +10", events)
|
238
|
+
when Curses::KEY_BACKSPACE then may_fail(c, "seek 0", events)
|
238
239
|
# yes, some of us have long audio files
|
239
|
-
when Curses::KEY_PPAGE then c
|
240
|
-
when Curses::KEY_NPAGE then c
|
240
|
+
when Curses::KEY_PPAGE then may_fail(c, "seek +600", events)
|
241
|
+
when Curses::KEY_NPAGE then may_fail(c, "seek -600", events)
|
241
242
|
when '9' then c.req_ok('rg volume-=0.01')
|
242
243
|
when '0' then c.req_ok('rg volume+=0.01')
|
243
244
|
when '=' then c.req_ok('rg volume=1')
|
@@ -248,8 +249,8 @@ def may_fail(res, events)
|
|
248
249
|
when "f" then c.req_ok("rg fallback_gain-=1")
|
249
250
|
when ">" then c.req_ok("tl next")
|
250
251
|
when "<" then c.req_ok("tl prev")
|
251
|
-
when "!" then may_fail(c
|
252
|
-
when "@" then may_fail(c
|
252
|
+
when "!" then may_fail(c, "cue prev", events)
|
253
|
+
when "@" then may_fail(c, "cue next", events)
|
253
254
|
when "o" then tfmt = update_tfmt(prec_step[prec_nr], tsec = !tsec)
|
254
255
|
when " "
|
255
256
|
c.req("play_pause")
|
data/bin/dtas-splitfx
CHANGED
@@ -23,6 +23,9 @@
|
|
23
23
|
end
|
24
24
|
op.on('-b', '--bits RATE', Integer) { |val| opts[:bits] = val }
|
25
25
|
op.on('-t', '--trim POSITION') { |val| opts[:trim] = val.tr(',', ' ') }
|
26
|
+
op.on('-E', '--err-suffix SUFFIX') do |val|
|
27
|
+
opts[:err_suffix] = val.start_with?('.') ? val.freeze : ".#{val}"
|
28
|
+
end
|
26
29
|
op.on('-p', '--sox-pipe') do
|
27
30
|
opts[:sox_pipe] = true
|
28
31
|
default_target = 'sox'
|
@@ -30,6 +33,10 @@
|
|
30
33
|
op.parse!(ARGV)
|
31
34
|
end
|
32
35
|
|
36
|
+
if opts[:sox_pipe] && opts[:err_suffix]
|
37
|
+
abort '--err-suffix and --sox-pipe are mutually exclusive'
|
38
|
+
end
|
39
|
+
|
33
40
|
args = []
|
34
41
|
ARGV.each do |arg|
|
35
42
|
case arg
|
data/lib/dtas/encoding.rb
CHANGED
@@ -11,15 +11,14 @@ def self.extended(mod)
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def try_enc_harder(str, enc, old) # :nodoc:
|
14
|
+
begin
|
15
|
+
require 'charlock_holmes'
|
16
|
+
@charlock_holmes = CharlockHolmes::EncodingDetector.new
|
17
|
+
rescue LoadError
|
18
|
+
@charlock_holmes = false
|
19
|
+
end if @charlock_holmes.nil?
|
20
|
+
|
14
21
|
case @charlock_holmes
|
15
|
-
when nil
|
16
|
-
begin
|
17
|
-
require 'charlock_holmes'
|
18
|
-
@charlock_holmes = CharlockHolmes::EncodingDetector.new
|
19
|
-
rescue LoadError
|
20
|
-
warn "`charlock_holmes` gem not available for encoding detection"
|
21
|
-
@charlock_holmes = false
|
22
|
-
end
|
23
22
|
when false
|
24
23
|
enc_fallback(str, enc, old)
|
25
24
|
else
|
@@ -197,19 +197,20 @@ def __goto_offset_samples(offset)
|
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
|
+
def __offset_to_i(offset, src)
|
201
|
+
# either "999s" for 999 samples or HH:MM:SS for time
|
202
|
+
offset.sub!(/s\z/, '') ? offset.to_i : src.format.hhmmss_to_samples(offset)
|
203
|
+
end
|
204
|
+
|
200
205
|
def __offset_to_samples(offset)
|
201
|
-
offset
|
202
|
-
@current.format.hhmmss_to_samples(offset)
|
206
|
+
__offset_to_i(offset, @current)
|
203
207
|
end
|
204
208
|
|
205
209
|
# returns seek offset as an Integer in sample count
|
206
|
-
def __seek_offset_adj(dir, offset
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
offset = @current.format.hhmmss_to_samples(offset)
|
211
|
-
end
|
212
|
-
n = __current_decoded_samples + (dir * offset)
|
210
|
+
def __seek_offset_adj(dir, offset,
|
211
|
+
src = @current,
|
212
|
+
current_decoded_samples = __current_decoded_samples)
|
213
|
+
n = current_decoded_samples + (dir * __offset_to_i(offset, src))
|
213
214
|
n = 0 if n < 0
|
214
215
|
"#{n}s"
|
215
216
|
end
|
@@ -391,15 +392,17 @@ def seek_internal(cur, offset)
|
|
391
392
|
end
|
392
393
|
end
|
393
394
|
|
395
|
+
def __offset_direction(offset)
|
396
|
+
offset.sub!(/\A\+/, '') ? 1 : (offset.sub!(/\A-/, '') ? -1 : nil)
|
397
|
+
end
|
398
|
+
|
394
399
|
def dpc_seek(io, msg)
|
395
400
|
offset = msg[0] or return io.emit('ERR usage: seek OFFSET')
|
396
401
|
if @current
|
397
402
|
if @current.respond_to?(:infile)
|
398
403
|
begin
|
399
|
-
if offset
|
400
|
-
offset = __seek_offset_adj(
|
401
|
-
elsif offset.sub!(/\A-/, '')
|
402
|
-
offset = __seek_offset_adj(-1, offset)
|
404
|
+
if direction = __offset_direction(offset)
|
405
|
+
offset = __seek_offset_adj(direction, offset)
|
403
406
|
# else: pass to sox directly
|
404
407
|
end
|
405
408
|
rescue ArgumentError
|
@@ -413,7 +416,12 @@ def dpc_seek(io, msg)
|
|
413
416
|
case file = @queue[0]
|
414
417
|
when String
|
415
418
|
@queue[0] = [ file, offset ]
|
416
|
-
when Array
|
419
|
+
when Array # offset already stored, adjust
|
420
|
+
if direction = __offset_direction(offset)
|
421
|
+
tmp = try_file(*file)
|
422
|
+
cur_off = __offset_to_i(file[1].dup, tmp)
|
423
|
+
offset = __seek_offset_adj(direction, offset, tmp, cur_off)
|
424
|
+
end
|
417
425
|
file[1] = offset
|
418
426
|
else
|
419
427
|
return io.emit("ERR unseekable")
|
data/lib/dtas/splitfx.rb
CHANGED
@@ -207,11 +207,11 @@ def splitfx_spawn(target, t, opts)
|
|
207
207
|
env["DITHERFX"] = "dither -s"
|
208
208
|
end
|
209
209
|
comments = Tempfile.new(%W(dtas-splitfx-#{t.comments["TRACKNUMBER"]} .txt))
|
210
|
-
comments.sync = true
|
211
210
|
t.comments.each do |k,v|
|
212
211
|
env[k] = v.to_s
|
213
212
|
comments.puts("#{k}=#{v}")
|
214
213
|
end
|
214
|
+
comments.flush
|
215
215
|
env["COMMENTS"] = "--comment-file=#{comments.path}"
|
216
216
|
infile_env(env, @infile)
|
217
217
|
outarg = outfmt.to_sox_arg
|
@@ -250,7 +250,10 @@ def splitfx_spawn(target, t, opts)
|
|
250
250
|
command = 'true' if opts[:dryrun] # still gotta fork
|
251
251
|
|
252
252
|
# pgroup: false so Ctrl-C on command-line will immediately stop everything
|
253
|
-
|
253
|
+
o = { pgroup: false }
|
254
|
+
e = opts[:err_suffix] and
|
255
|
+
o[:err] = [ "#{env['OUTDIR']}#{env['TRACKNUMBER']}#{e}", 'a' ]
|
256
|
+
[ dtas_spawn(env, command, o), comments ]
|
254
257
|
end
|
255
258
|
|
256
259
|
def load_tracks!(hash)
|
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.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dtas hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Free Software command-line tools for audio playback, mastering, and
|