* Ruby 2.2.0 and SoX 14.4.2rc2 released \o/
@ 2014-12-27 5:01 7% Eric Wong
0 siblings, 0 replies; 1+ results
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 related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-12-27 5:01 7% Ruby 2.2.0 and SoX 14.4.2rc2 released \o/ 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).