about summary refs log tree commit homepage
path: root/lib/dtas/format.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-06 23:15:36 +0000
committerEric Wong <e@80x24.org>2015-09-06 23:16:43 +0000
commit856b1c7064155e59c84942a7e8cd36128b6be34e (patch)
treec45027bedec2caa280c26c815f45a8f4d1b8a120 /lib/dtas/format.rb
parentc3bb7810709a99a9886c7f96aed6fa62690a12cb (diff)
downloaddtas-856b1c7064155e59c84942a7e8cd36128b6be34e.tar.gz
This allows us to avoid wasting time reopening the same
device over and over again.
Diffstat (limited to 'lib/dtas/format.rb')
-rw-r--r--lib/dtas/format.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dtas/format.rb b/lib/dtas/format.rb
index a6314bd..cfcec64 100644
--- a/lib/dtas/format.rb
+++ b/lib/dtas/format.rb
@@ -44,9 +44,9 @@ class DTAS::Format # :nodoc:
 
   def self.precision(env, infile)
     # sox.git f4562efd0aa3
-    qx(env, %W(soxi -p #{infile}), err: "/dev/null").to_i
+    qx(env, %W(soxi -p #{infile}), err: DTAS.null).to_i
   rescue # fallback to parsing the whole output
-    s = qx(env, %W(soxi #{infile}), err: "/dev/null")
+    s = qx(env, %W(soxi #{infile}), err: DTAS.null)
     s =~ /Precision\s+:\s*(\d+)-bit/n
     v = $1.to_i
     return v if v > 0