diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-25 09:25:07 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-25 09:29:46 +0000 |
commit | 68ffa097e187da663fa3f537b430428ea5e8de2e (patch) | |
tree | be7d441b68ab8c77a7ebc062c129b5701bf2a5b1 /lib/dtas/player.rb | |
parent | 9cd8e2776edc246950d2c7ebdea833489efb1d1f (diff) | |
download | dtas-68ffa097e187da663fa3f537b430428ea5e8de2e.tar.gz |
We should've done this at the start, but we didn't.
Diffstat (limited to 'lib/dtas/player.rb')
-rw-r--r-- | lib/dtas/player.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index c6d6027..57976c2 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -5,7 +5,8 @@ require 'yaml' require 'shellwords' require_relative '../dtas' require_relative 'source' -require_relative 'source/command' +require_relative 'source/sox' +require_relative 'source/cmd' require_relative 'sink' require_relative 'unix_server' require_relative 'buffer' @@ -304,17 +305,17 @@ class DTAS::Player # :nodoc: case source_spec when String - @current = DTAS::Source.new(source_spec) + @current = DTAS::Source::Sox.new(source_spec) echo(%W(file #{@current.infile})) when Array - @current = DTAS::Source.new(*source_spec) + @current = DTAS::Source::Sox.new(*source_spec) echo(%W(file #{@current.infile} #{@current.offset_samples}s)) else - @current = DTAS::Source::Command.new(source_spec["command"]) + @current = DTAS::Source::Cmd.new(source_spec["command"]) echo(%W(command #{@current.command_string})) end - if DTAS::Source === @current + if DTAS::Source::Sox === @current @current.command = @srccmd if @srccmd @current.env = @srcenv.dup unless @srcenv.empty? end |