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.18.0 - duct tape audio suite for *nix
@ 2020-02-03  8:36  6% Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2020-02-03  8:36 UTC (permalink / raw)
  To: dtas-all

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:

    dtas 0.18.0
    
    fiddle is now supported for Linux users without a C compiler or
    Ruby headers installed to take advantage of inotify(7)
    functionality and efficiency improvements with splice(2) and
    eventfd(7).
    
    For non-RubyGems users, there's some setup.rb fixes thanks
    to James Rowe.
    
    Eric Wong (8):
          doc: fixup leftover ftp://lists.gnu.org links
          pipe: avoid loading sleepy_penguin
          provide fiddle-based eventfd implementation
          buffer: replace sleepy_penguin with fiddle
          watchable: use fiddle for inotify support
          doc: remove most recommendations for sleepy_penguin
          INSTALL: s/bogomips.org/yhbt.net/
          doc: update copyrights for 2020
    
    James Rowe (2):
          setup: update to use RbConfig
          setup: fix duplicate variable warning

* homepage: https://80x24.org/dtas.git/about
* 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/
  nntp://news.public-inbox.org/inbox.comp.audio.dtas
  https://80x24.org/dtas-all/new.atom


^ permalink raw reply	[relevance 6%]

* [PATCH v2 1/5] pipe: avoid loading sleepy_penguin
  2019-12-20  1:39  7% [PATCH v2 0/5] support fiddle for Linux-only syscalls Eric Wong
@ 2019-12-20  1:39  6% ` Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2019-12-20  1:39 UTC (permalink / raw)
  To: dtas-all

The values of F_{GET,SET}PIPE_SZ are architecture-independent
and stable in Linux (unlike Ruby :P), so we won't need to bother
loading an extra .so here for two constants.
---
 lib/dtas/pipe.rb            | 20 ++++++++++++--------
 test/test_sink_pipe_size.rb | 27 ++++++++++++---------------
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/lib/dtas/pipe.rb b/lib/dtas/pipe.rb
index 58d926c..4c3203d 100644
--- a/lib/dtas/pipe.rb
+++ b/lib/dtas/pipe.rb
@@ -1,10 +1,6 @@
 # Copyright (C) 2013-2019 all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-begin
-  require 'sleepy_penguin'
-rescue LoadError
-end
 require_relative '../dtas'
 require_relative 'writable_iter'
 require_relative 'nonblock'
@@ -14,6 +10,11 @@ class DTAS::Pipe < DTAS::Nonblock # :nodoc:
   include DTAS::WritableIter
   attr_accessor :sink
 
+  if RUBY_PLATFORM =~ /linux/i && File.readable?('/proc/sys/fs/pipe-max-size')
+    F_SETPIPE_SZ = 1031
+    F_GETPIPE_SZ = 1032
+  end
+
   def self.new
     _, w = rv = pipe
     w.writable_iter_init
@@ -21,13 +22,16 @@ def self.new
   end
 
   def pipe_size=(nr)
-    defined?(SleepyPenguin::F_SETPIPE_SZ) and
-      fcntl(SleepyPenguin::F_SETPIPE_SZ, nr)
+    fcntl(F_SETPIPE_SZ, nr) if defined?(F_SETPIPE_SZ)
+  rescue Errno::EINVAL # old kernel
+  rescue Errno::EPERM
+    # resizes fail if Linux is close to the pipe limit for the user
+    # or if the user does not have permissions to resize
   end
 
   def pipe_size
-    fcntl(SleepyPenguin::F_GETPIPE_SZ)
-  end if defined?(SleepyPenguin::F_GETPIPE_SZ)
+    fcntl(F_GETPIPE_SZ)
+  end if defined?(F_GETPIPE_SZ)
 
   # avoid syscall, we never change IO#nonblock= directly
   def nonblock?
diff --git a/test/test_sink_pipe_size.rb b/test/test_sink_pipe_size.rb
index 1b6db72..bbe2884 100644
--- a/test/test_sink_pipe_size.rb
+++ b/test/test_sink_pipe_size.rb
@@ -1,20 +1,17 @@
 # Copyright (C) 2013-2019 all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-begin
-  require 'sleepy_penguin'
-  require './test/player_integration'
-  class TestSinkPipeSizeIntegration < Testcase
-    include PlayerIntegration
+require './test/player_integration'
+class TestSinkPipeSizeIntegration < Testcase
+  include PlayerIntegration
 
-    def test_sink_pipe_size_integration
-      s = client_socket
-      default_sink_pid(s)
-      s.req_ok("sink ed default pipe_size=0x1000")
-      s.req_ok("sink ed default pipe_size=0x10000")
-      s.req_ok("sink ed default pipe_size=")
-      s.req_ok("sink ed default pipe_size=4096")
-    end if SleepyPenguin.const_defined?(:F_SETPIPE_SZ)
+  def test_sink_pipe_size_integration
+    s = client_socket
+    default_sink_pid(s)
+    s.req_ok("sink ed default pipe_size=0x1000")
+    s.req_ok("sink ed default pipe_size=0x10000")
+    s.req_ok("sink ed default pipe_size=")
+    s.req_ok("sink ed default pipe_size=4096")
   end
-rescue LoadError
-end
+end if RUBY_PLATFORM =~ /linux/i &&
+      File.readable?('/proc/sys/fs/pipe-max-size')


^ permalink raw reply related	[relevance 6%]

* [PATCH v2 0/5] support fiddle for Linux-only syscalls
@ 2019-12-20  1:39  7% Eric Wong
  2019-12-20  1:39  6% ` [PATCH v2 1/5] pipe: avoid loading sleepy_penguin Eric Wong
  0 siblings, 1 reply; 5+ results
From: Eric Wong @ 2019-12-20  1:39 UTC (permalink / raw)
  To: dtas-all

fiddle can be used as an alternative to sleepy_penguin, since
sleepy_penguin requires development headers and a compiler to
install, and fiddle is bundled as part of Ruby.  sleepy_penguin
can still be faster, though, so we continue supporting
sleepy_penguin.

Eric Wong (5):
  pipe: avoid loading sleepy_penguin
  provide fiddle-based eventfd implementation
  buffer: replace sleepy_penguin with fiddle
  watchable: use fiddle for inotify support
  doc: remove most recommendations for sleepy_penguin

 Documentation/dtas-sinkedit.pod   |   2 +-
 Documentation/dtas-sourceedit.pod |   2 +-
 INSTALL                           |  16 +--
 lib/dtas.rb                       |   8 ++
 lib/dtas/buffer.rb                |  15 ++-
 lib/dtas/buffer/fiddle_splice.rb  | 216 ++++++++++++++++++++++++++++++
 lib/dtas/buffer/read_write.rb     |   4 +-
 lib/dtas/buffer/splice.rb         |   2 +
 lib/dtas/pipe.rb                  |  20 +--
 lib/dtas/sigevent.rb              |   7 +-
 lib/dtas/sigevent/efd.rb          |   2 +
 lib/dtas/sigevent/fiddle_efd.rb   |  38 ++++++
 lib/dtas/sigevent/pipe.rb         |   2 +-
 lib/dtas/watchable.rb             | 115 ++++++++--------
 lib/dtas/watchable/fiddle_ino.rb  |  78 +++++++++++
 lib/dtas/watchable/inotify.rb     |  13 ++
 test/test_buffer.rb               |  10 +-
 test/test_sigevent.rb             |  20 +++
 test/test_sink_pipe_size.rb       |  27 ++--
 19 files changed, 486 insertions(+), 111 deletions(-)
 create mode 100644 lib/dtas/buffer/fiddle_splice.rb
 create mode 100644 lib/dtas/sigevent/fiddle_efd.rb
 create mode 100644 lib/dtas/watchable/fiddle_ino.rb
 create mode 100644 lib/dtas/watchable/inotify.rb
 create mode 100644 test/test_sigevent.rb



^ permalink raw reply	[relevance 7%]

* [PATCH 1/5] pipe: avoid loading sleepy_penguin
  2019-12-01  1:26  6% [PATCH 0/5] use fiddle for Linux-specific APIs Eric Wong
@ 2019-12-01  1:26  6% ` Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2019-12-01  1:26 UTC (permalink / raw)
  To: dtas-all

The values of F_{GET,SET}PIPE_SZ are architecture-independent
and stable in Linux (unlike Ruby :P), so we won't need to bother
loading an extra .so here for two constants.
---
 lib/dtas/pipe.rb            | 20 ++++++++++++--------
 test/test_sink_pipe_size.rb | 27 ++++++++++++---------------
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/lib/dtas/pipe.rb b/lib/dtas/pipe.rb
index 58d926c..4c3203d 100644
--- a/lib/dtas/pipe.rb
+++ b/lib/dtas/pipe.rb
@@ -1,10 +1,6 @@
 # Copyright (C) 2013-2019 all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-begin
-  require 'sleepy_penguin'
-rescue LoadError
-end
 require_relative '../dtas'
 require_relative 'writable_iter'
 require_relative 'nonblock'
@@ -14,6 +10,11 @@ class DTAS::Pipe < DTAS::Nonblock # :nodoc:
   include DTAS::WritableIter
   attr_accessor :sink
 
+  if RUBY_PLATFORM =~ /linux/i && File.readable?('/proc/sys/fs/pipe-max-size')
+    F_SETPIPE_SZ = 1031
+    F_GETPIPE_SZ = 1032
+  end
+
   def self.new
     _, w = rv = pipe
     w.writable_iter_init
@@ -21,13 +22,16 @@ def self.new
   end
 
   def pipe_size=(nr)
-    defined?(SleepyPenguin::F_SETPIPE_SZ) and
-      fcntl(SleepyPenguin::F_SETPIPE_SZ, nr)
+    fcntl(F_SETPIPE_SZ, nr) if defined?(F_SETPIPE_SZ)
+  rescue Errno::EINVAL # old kernel
+  rescue Errno::EPERM
+    # resizes fail if Linux is close to the pipe limit for the user
+    # or if the user does not have permissions to resize
   end
 
   def pipe_size
-    fcntl(SleepyPenguin::F_GETPIPE_SZ)
-  end if defined?(SleepyPenguin::F_GETPIPE_SZ)
+    fcntl(F_GETPIPE_SZ)
+  end if defined?(F_GETPIPE_SZ)
 
   # avoid syscall, we never change IO#nonblock= directly
   def nonblock?
diff --git a/test/test_sink_pipe_size.rb b/test/test_sink_pipe_size.rb
index 1b6db72..bbe2884 100644
--- a/test/test_sink_pipe_size.rb
+++ b/test/test_sink_pipe_size.rb
@@ -1,20 +1,17 @@
 # Copyright (C) 2013-2019 all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-begin
-  require 'sleepy_penguin'
-  require './test/player_integration'
-  class TestSinkPipeSizeIntegration < Testcase
-    include PlayerIntegration
+require './test/player_integration'
+class TestSinkPipeSizeIntegration < Testcase
+  include PlayerIntegration
 
-    def test_sink_pipe_size_integration
-      s = client_socket
-      default_sink_pid(s)
-      s.req_ok("sink ed default pipe_size=0x1000")
-      s.req_ok("sink ed default pipe_size=0x10000")
-      s.req_ok("sink ed default pipe_size=")
-      s.req_ok("sink ed default pipe_size=4096")
-    end if SleepyPenguin.const_defined?(:F_SETPIPE_SZ)
+  def test_sink_pipe_size_integration
+    s = client_socket
+    default_sink_pid(s)
+    s.req_ok("sink ed default pipe_size=0x1000")
+    s.req_ok("sink ed default pipe_size=0x10000")
+    s.req_ok("sink ed default pipe_size=")
+    s.req_ok("sink ed default pipe_size=4096")
   end
-rescue LoadError
-end
+end if RUBY_PLATFORM =~ /linux/i &&
+      File.readable?('/proc/sys/fs/pipe-max-size')


^ permalink raw reply related	[relevance 6%]

* [PATCH 0/5] use fiddle for Linux-specific APIs
@ 2019-12-01  1:26  6% Eric Wong
  2019-12-01  1:26  6% ` [PATCH 1/5] pipe: avoid loading sleepy_penguin Eric Wong
  0 siblings, 1 reply; 5+ results
From: Eric Wong @ 2019-12-01  1:26 UTC (permalink / raw)
  To: dtas-all

fiddle is distributed with Ruby since 1.9.2 (and the oldest we
support is 1.9.3).  So instead of expecting potential users to
install Ruby development headers and a C compiler, just use
fiddle to save potential users bandwidth and storage space.

We have to define some hard-coded constants, but all of these
constants are architecture-independent and we can trust the
Linux kernel to never break userspace.

Eric Wong (5):
  pipe: avoid loading sleepy_penguin
  use fiddle-based eventfd implementation
  buffer: replace sleepy_penguin with fiddle
  watchable: use fiddle for inotify support
  doc: remove "sleepy_penguin" references

 Documentation/dtas-sinkedit.pod               |  2 +-
 Documentation/dtas-sourceedit.pod             |  2 +-
 INSTALL                                       | 19 -----
 dtas-linux.gemspec                            | 19 -----
 lib/dtas.rb                                   |  8 ++
 lib/dtas/buffer.rb                            |  7 +-
 .../buffer/{splice.rb => fiddle_splice.rb}    | 75 ++++++++++++----
 lib/dtas/buffer/read_write.rb                 |  4 +-
 lib/dtas/pipe.rb                              | 20 +++--
 lib/dtas/sigevent.rb                          |  3 +-
 lib/dtas/sigevent/efd.rb                      | 20 -----
 lib/dtas/sigevent/fiddle_efd.rb               | 38 +++++++++
 lib/dtas/sigevent/pipe.rb                     |  2 +-
 lib/dtas/watchable.rb                         | 85 +++++++++++++++++--
 test/test_buffer.rb                           | 10 +--
 test/test_sigevent.rb                         | 20 +++++
 test/test_sink_pipe_size.rb                   | 27 +++---
 17 files changed, 240 insertions(+), 121 deletions(-)
 delete mode 100644 dtas-linux.gemspec
 rename lib/dtas/buffer/{splice.rb => fiddle_splice.rb} (68%)
 delete mode 100644 lib/dtas/sigevent/efd.rb
 create mode 100644 lib/dtas/sigevent/fiddle_efd.rb
 create mode 100644 test/test_sigevent.rb



^ permalink raw reply	[relevance 6%]

Results 1-5 of 5 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2019-12-01  1:26  6% [PATCH 0/5] use fiddle for Linux-specific APIs Eric Wong
2019-12-01  1:26  6% ` [PATCH 1/5] pipe: avoid loading sleepy_penguin Eric Wong
2019-12-20  1:39  7% [PATCH v2 0/5] support fiddle for Linux-only syscalls Eric Wong
2019-12-20  1:39  6% ` [PATCH v2 1/5] pipe: avoid loading sleepy_penguin Eric Wong
2020-02-03  8:36  6% [ANN] dtas 0.18.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).