everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] dtas 0.20.0 - duct tape audio suite for *nix
@ 2022-02-03  5:15  4% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-02-03  5:15 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, Perl5, and some embedded shell, but may use other languages in
the future.

Changes:

    dtas 0.20.0 - ruby 3.1+ compatibility, splitfx improvements

    This release catches up with Psych (YAML) changes in Ruby 3.1+
    Ruby 2.3+ is now the minimum version, though keep in mind the
    ruby-core team already dropped support for it long ago.

    Most of the features are focused on audio engineering
    capabilities of dtas-splitfx.  dtas-splitfx gains the --filter
    switch, along with per-track environment variables and comments.
    These new features have made my workflow significantly better.

    dtas-archive supports explicit comments, and omits the default
    SoX comment.  To better cope with temporary and modified files
    during editing, dtas-player metadata now checks ctime before
    reusing the cache, handy for frequently-modified files.
    "dtas-tl prune" is now supported to cull temporary files from
    the player tracklist.

    There's a few dtas-console improvements, too.

    28 changes since v0.19.0 (2021-09-05):

          archive: support comments, default to none
          splitfx: use Etc.nprocessors for jobs if unspecified
          dtas-console: set X11 terminal title iff DISPLAY is set
          dtas-console: add 'i' toggle to show comments (metadata)
          splitfx: fix track_zpad with integer arg
          doc: drop ordered map from examples
          player: reduce syscalls when splicing to single target
          dtas-console: support Wayland terminal titles, too
          console: workaround safe warnings in outdated `curses' gem
          require Ruby 2.3+
          get rid of DTAS.dedupe_str wrapper
          move dtas-graph into script/, support Perl for dtas.sh
          use YAML.unsafe_load in Psych 4.x (Ruby 3.1+)
          deduplicate and freeze pathnames + metadata
          player: remove omap conversion
          dtas: drop unnecessary "require 'yaml'" statements
          dtas-tl prune: cull missing files from tracklist
          dtas-tl: drop encoding hacks, use binary stdout+stderr
          use IO#wait_readable consistently
          get rid of DTAS::Nonblock wrapper for Ruby <= 2.0
          unix_accepted: drop Ruby < 2.3 support code
          do not check IO#closed? before calling IO#close
          splitfx: support per-track environment variables
          splitfx: add --filter option to limit match to comments
          player: expire sox metadata cache on file st_ctime changes
          readahead: do not call -@ on non-String
          splitfx: disallow combining --trim and --filter
          splitfx: document changes ahead of 0.20.0 release

* 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://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.dtas
  imap://anon:mous@7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.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 4%]

* [PATCH] player: reduce syscalls when splicing to single target
@ 2022-01-11 18:20  7% Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-01-11 18:20 UTC (permalink / raw)
  To: dtas-all

splice(2) alone does not give enough information as to whether
the source or destination is blocking.  However, as far as audio
playback chain goes, the sink should ALWAYS be the limiting
factor as decoder sources need to be able to produce data at
least as fast as the audio is being played (otherwise there'll
be audible drops).

Thus, we bias the select(2) into waiting on a targets on if we
splice(2) less than the data we requested.
---
 lib/dtas/buffer/fiddle_splice.rb | 3 ++-
 lib/dtas/buffer/splice.rb        | 3 ++-
 test/test_buffer.rb              | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/dtas/buffer/fiddle_splice.rb b/lib/dtas/buffer/fiddle_splice.rb
index ad007eb..d9232cd 100644
--- a/lib/dtas/buffer/fiddle_splice.rb
+++ b/lib/dtas/buffer/fiddle_splice.rb
@@ -84,7 +84,8 @@ def broadcast_one(targets, limit = nil)
       targets # our one and only target blocked on write
     else
       @bytes_xfer += s
-      :wait_readable # we want to read more from @to_io soon
+      # s < limit means targets[0] is full
+      s < limit ? targets : :wait_readable
     end
   rescue Errno::EPIPE, IOError => e
     __dst_error(targets[0], e)
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index e5d17ab..b9957ce 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -39,7 +39,8 @@ def broadcast_one(targets, limit = nil)
       targets # our one and only target blocked on write
     else
       @bytes_xfer += s
-      :wait_readable # we want to read more from @to_io soon
+      # s < limit means targets[0] is full
+      s < limit ? targets : :wait_readable
     end
   rescue Errno::EPIPE, IOError => e
     __dst_error(targets[0], e)
diff --git a/test/test_buffer.rb b/test/test_buffer.rb
index 54ee584..b89a090 100644
--- a/test/test_buffer.rb
+++ b/test/test_buffer.rb
@@ -62,7 +62,7 @@ def test_broadcast_1
     buf = new_buffer
     r, w = IO.pipe
     buf.wr.write "HIHI"
-    assert_equal :wait_readable, buf.broadcast([w])
+    assert_equal [w], buf.broadcast([w])
     assert_equal 4, buf.bytes_xfer
     tmp = [w]
     r.close


^ 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 --
2022-01-11 18:20  7% [PATCH] player: reduce syscalls when splicing to single target Eric Wong
2022-02-03  5:15  4% [ANN] dtas 0.20.0 - 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).