* [ANN] dtas 0.18.1 - duct tape audio suite for *nix
@ 2021-02-13 21:59 6% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-02-13 21:59 UTC (permalink / raw)
To: dtas-all, ruby-talk
Free Software command-line tools for audio playback, mastering, and
whatever else related to audio. dtas follows the worse-is-better
philosophy and acts as duct tape to combine existing command-line tools
for flexibility and ease-of-development. dtas is currently implemented
in Ruby (and some embedded shell), but may use other languages in the
future.
Changes:
Mainly seek improvements to dtas-player. The fallback to use
charlock-holmes for strangely-encoded files is fixed.
7 changes since 0.18.0 (2020-02-03):
splitfx: reduce syscalls for writing comments file
splitfx: support --err-suffix option
player: fix +/- directional seeks while paused
README: update and add more URLs for archives
encoding: use CharlockHolmes properly on first run
dtas-console: gracefully handle seek failures
INSTALL: update dependencies for current Debian stable
* homepage: https://80x24.org/dtas/
* https://80x24.org/dtas/INSTALL
* https://80x24.org/dtas/dtas-player.txt
* https://80x24.org/dtas/NEWS.atom
* git clone https://80x24.org/dtas.git
* dtas-all@nongnu.org (plain-text only, no HTML mail, please)
* mail archives: https://80x24.org/dtas-all/
nntps://news.public-inbox.org/inbox.comp.audio.dtas
imaps://anon:mous@public-inbox.org/inbox.comp.audio.dtas.0
nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas
imap://anon:mous@ou63pmih66umazou.onion/inbox.comp.audio.dtas.0
https://80x24.org/dtas-all/new.atom
note: .onion URLs require Tor: <https://www.torproject.org/>
^ permalink raw reply [relevance 6%]
* [PATCH] dtas-console: gracefully handle seek failures
@ 2021-02-13 21:34 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-02-13 21:34 UTC (permalink / raw)
To: dtas-all
dtas-console doesn't need to quit when a user attempts to seek
an unseekable file, since the user often doesn't know it's
unseekable until a seek is attempted.
---
bin/dtas-console | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/bin/dtas-console b/bin/dtas-console
index d7e1a23..0c56450 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org>
+# Copyright (C) 2013-2021 all contributors <dtas-all@nongnu.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
# frozen_string_literal: true
#
@@ -112,7 +112,8 @@ def rg_string(rg, current)
rv
end
-def may_fail(res, events)
+def may_fail(c, req, events)
+ res = c.req(req)
events << res if res != "OK"
end
@@ -227,17 +228,17 @@ def may_fail(res, events)
when $stdin
# keybindings taken from mplayer / vi
case key = Curses.getch
- when "j" then c.req_ok("seek -5")
- when "k" then c.req_ok("seek +5")
+ when "j" then may_fail(c, "seek -5", events)
+ when "k" then may_fail(c, "seek +5", events)
when "q" then exit(0)
- when Curses::KEY_DOWN then c.req_ok("seek -60")
- when Curses::KEY_UP then c.req_ok("seek +60")
- when Curses::KEY_LEFT then c.req_ok("seek -10")
- when Curses::KEY_RIGHT then c.req_ok("seek +10")
- when Curses::KEY_BACKSPACE then c.req_ok("seek 0")
+ when Curses::KEY_DOWN then may_fail(c, "seek -60", events)
+ when Curses::KEY_UP then may_fail(c, "seek +60", events)
+ when Curses::KEY_LEFT then may_fail(c, "seek -10", events)
+ when Curses::KEY_RIGHT then may_fail(c, "seek +10", events)
+ when Curses::KEY_BACKSPACE then may_fail(c, "seek 0", events)
# yes, some of us have long audio files
- when Curses::KEY_PPAGE then c.req_ok("seek +600")
- when Curses::KEY_NPAGE then c.req_ok("seek -600")
+ when Curses::KEY_PPAGE then may_fail(c, "seek +600", events)
+ when Curses::KEY_NPAGE then may_fail(c, "seek -600", events)
when '9' then c.req_ok('rg volume-=0.01')
when '0' then c.req_ok('rg volume+=0.01')
when '=' then c.req_ok('rg volume=1')
@@ -248,8 +249,8 @@ def may_fail(res, events)
when "f" then c.req_ok("rg fallback_gain-=1")
when ">" then c.req_ok("tl next")
when "<" then c.req_ok("tl prev")
- when "!" then may_fail(c.req("cue prev"), events)
- when "@" then may_fail(c.req("cue next"), events)
+ when "!" then may_fail(c, "cue prev", events)
+ when "@" then may_fail(c, "cue next", events)
when "o" then tfmt = update_tfmt(prec_step[prec_nr], tsec = !tsec)
when " "
c.req("play_pause")
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-02-13 21:34 7% [PATCH] dtas-console: gracefully handle seek failures Eric Wong
2021-02-13 21:59 6% [ANN] dtas 0.18.1 - duct tape audio suite for *nix Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).