From: Eric Wong <e@80x24.org>
To: dtas-all@nongnu.org
Subject: Ruby 2.2.0 and SoX 14.4.2rc2 released \o/
Date: Sat, 27 Dec 2014 05:01:15 +0000 [thread overview]
Message-ID: <20141227050115.GA6805@dcvr.yhbt.net> (raw)
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
reply other threads:[~2014-12-27 5:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://80x24.org/dtas/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141227050115.GA6805@dcvr.yhbt.net \
--to=e@80x24.org \
--cc=dtas-all@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).