everything related to duct tape audio suite (dtas)
 help / color / mirror / Atom feed
* Ruby 2.2.0 and SoX 14.4.2rc2 released \o/
@ 2014-12-27  5:01 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-12-27  5:01 UTC (permalink / raw)
  To: dtas-all

Official release announcement for Ruby:

  https://www.ruby-lang.org/en/news/2014/12/25/ruby-2-2-0-released/

...and for SoX rc1 and rc2:

  http://mid.gmane.org/20141221181038.GA20602@cbdesk (14.4.2rc1)
  http://mid.gmane.org/20141223012110.GA18028@cbdesk (14.4.2rc2)

There's a bunch of bugfixes and improvements in both.
I'm most happy my various LADSPA improvements are now in SoX :)
There are also speedups in SoX resampling which helps slow
machines, along with some speedups in Ruby.

dtas will continue to work with Ruby 1.9.3+ for the forseeable
future, but Ruby 2.2.0 brings a bunch of changes relevant
to us:

* Garbage collection is incremental, giving lower pause times.
  Anybody who experienced skipping problems in the past using tiny
  audio buffers or slow systems is encouraged to try this.

* There is also vfork() support for use with Process.spawn, which means
  spawning our sox/metaflac/ecasound/etc... sub-processes is faster.

With one minor compatibility note:

* "curses" is now a separate gem, so you'll need to "gem install curses"
  to use "dtas-console"

I'll push the following out (more features coming):
----------------------------8<--------------------------------
From: Eric Wong <e@80x24.org>
Subject: [PATCH] test: favor Process.spawn when possible

Process.spawn allows vfork() + execve() usage in Ruby 2.2.0 to
improve performance over normal fork() + execve().
---
 test/test_player_integration.rb | 7 +++----
 test/test_splitfx.rb            | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/test/test_player_integration.rb b/test/test_player_integration.rb
index d4bae8d..66f599e 100644
--- a/test/test_player_integration.rb
+++ b/test/test_player_integration.rb
@@ -5,10 +5,9 @@ class TestPlayerIntegration < Testcase
   include PlayerIntegration
 
   def test_cmd_rate
-    pid = fork do
-      @fmt.to_env.each { |k,v| ENV[k] = v }
-      exec("sox -n $SOXFMT - synth 3 pinknoise | #@cmd")
-    end
+    env = ENV.to_hash.merge(@fmt.to_env)
+    cmd = "sox -n $SOXFMT - synth 3 pinknoise | #@cmd"
+    pid = Process.spawn(env, cmd)
     t = Time.now
     _, _ = Process.waitpid2(pid)
     elapsed = Time.now - t
diff --git a/test/test_splitfx.rb b/test/test_splitfx.rb
index fd1873e..ab0dcd2 100644
--- a/test/test_splitfx.rb
+++ b/test/test_splitfx.rb
@@ -31,9 +31,9 @@ class TestSplitfx < Testcase
 
         # compare results with expected output
         res_cmd = "sox 1.flac 2.flac -ts32 -c2 -r44100 result.s32"
-        res_pid = fork { exec res_cmd }
+        res_pid = Process.spawn(res_cmd)
         exp_cmd = "sox foo.flac -ts32 -c2 -r44100 expect.s32 trim 4"
-        exp_pid = fork { exec exp_cmd }
+        exp_pid = Process.spawn(exp_cmd)
         _, s = Process.waitpid2(res_pid)
         assert s.success?, "#{res_cmd}: #{s.inspect}"
         _, s = Process.waitpid2(exp_pid)
-- 
EW


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-27  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-27  5:01 Ruby 2.2.0 and SoX 14.4.2rc2 released \o/ Eric Wong

everything related to duct tape audio suite (dtas)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://80x24.org/dtas-all
	git clone --mirror http://ou63pmih66umazou.onion/dtas-all

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 dtas-all dtas-all/ https://80x24.org/dtas-all \
		dtas-all@nongnu.org
	public-inbox-index dtas-all

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.dtas
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	../../../dtas.git

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git