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: |
* [PATCH 1/5] partstats: use Etc.nprocessors on Ruby 2.2+
  2015-01-17 11:49  5% [PATCH 0/5] misc updates, major sourceedit feature! Eric Wong
@ 2015-01-17 11:49  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-01-17 11:49 UTC (permalink / raw)
  To: dtas-all; +Cc: e

This will likely become more available and faster than GNU nproc(1)
over time.
---
 bin/dtas-partstats | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/bin/dtas-partstats b/bin/dtas-partstats
index 7026b2e..fd9bb0b 100755
--- a/bin/dtas-partstats
+++ b/bin/dtas-partstats
@@ -9,9 +9,15 @@
 require 'dtas/partstats'
 infile = ARGV[0] or abort "usage: #$0 INFILE"
 ps = DTAS::PartStats.new(infile)
-opts = {
-  jobs: `nproc 2>/dev/null || echo 2`.to_i
-}
+
+def nproc
+  require 'etc'
+  Etc.nprocessors
+rescue NoMethodError
+  `nproc 2>/dev/null || echo 2`.to_i
+end
+
+opts = { jobs: nproc }
 stats = ps.run(opts)
 
 headers = ps.key_idx.to_a
-- 
@@ -9,9 +9,15 @@
 require 'dtas/partstats'
 infile = ARGV[0] or abort "usage: #$0 INFILE"
 ps = DTAS::PartStats.new(infile)
-opts = {
-  jobs: `nproc 2>/dev/null || echo 2`.to_i
-}
+
+def nproc
+  require 'etc'
+  Etc.nprocessors
+rescue NoMethodError
+  `nproc 2>/dev/null || echo 2`.to_i
+end
+
+opts = { jobs: nproc }
 stats = ps.run(opts)
 
 headers = ps.key_idx.to_a
-- 
EW



^ permalink raw reply related	[relevance 7%]

* [PATCH 0/5] misc updates, major sourceedit feature!
@ 2015-01-17 11:49  5% Eric Wong
  2015-01-17 11:49  7% ` [PATCH 1/5] partstats: use Etc.nprocessors on Ruby 2.2+ Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-01-17 11:49 UTC (permalink / raw)
  To: dtas-all; +Cc: e

The last sourceedit change is _really_ exciting to me!
(as is the splitfx playback support pushed out earlier).

The editing/post-production-oriented features of dtas are
really coming together and I think 0.10.0 will be a big
milestone for this project.

Eric Wong (5):
      partstats: use Etc.nprocessors on Ruby 2.2+
      splitfx: remove unnecessary assignment
      player: enqueued commands cannot use bypass
      dtas-console: avoid crashing on failed cue seeks
      dtas-sourceedit: update player as user saves in the editor



^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2015-01-17 11:49  5% [PATCH 0/5] misc updates, major sourceedit feature! Eric Wong
2015-01-17 11:49  7% ` [PATCH 1/5] partstats: use Etc.nprocessors on Ruby 2.2+ 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).