diff options
Diffstat (limited to 'lib/dtas/source')
-rw-r--r-- | lib/dtas/source/sox.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb index 44b5f17..64ce095 100644 --- a/lib/dtas/source/sox.rb +++ b/lib/dtas/source/sox.rb @@ -36,7 +36,10 @@ class DTAS::Source::Sox # :nodoc: def format @format ||= begin fmt = DTAS::Format.new - fmt.from_file(@infile) + path = @infile + fmt.channels = qx(%W(soxi -c #{path})).to_i + fmt.type = qx(%W(soxi -t #{path})).strip + fmt.rate = qx(%W(soxi -r #{path})).to_i fmt.bits ||= precision fmt end |