From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-2.4 required=3.0 tests=AWL,BAYES_00,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: dtas-all@80x24.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 206301F7CA for ; Sat, 27 Dec 2014 05:01:27 +0000 (UTC) Received: from localhost ([::1]:55061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4jVE-0006Ie-6U for dtas-all@80x24.org; Sat, 27 Dec 2014 00:01:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4jVC-0006IZ-7E for dtas-all@nongnu.org; Sat, 27 Dec 2014 00:01:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4jV8-0005rX-6o for dtas-all@nongnu.org; Sat, 27 Dec 2014 00:01:22 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:34672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4jV8-0005rN-0p for dtas-all@nongnu.org; Sat, 27 Dec 2014 00:01:18 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id EC51B1F7CA; Sat, 27 Dec 2014 05:01:15 +0000 (UTC) Date: Sat, 27 Dec 2014 05:01:15 +0000 From: Eric Wong To: dtas-all@nongnu.org Subject: Ruby 2.2.0 and SoX 14.4.2rc2 released \o/ Message-ID: <20141227050115.GA6805@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.71.152.64 X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Sender: dtas-all-bounces+dtas-all=80x24.org@nongnu.org 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 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