about summary refs log tree commit homepage
path: root/lib/dtas/player.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-09 08:33:05 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-09 08:33:05 +0000
commit385563d1d99fda2735c78884ab135c8b77bc651a (patch)
tree56f0aedea71154e8473c6d4d59cc2e1f5d8e6c19 /lib/dtas/player.rb
parent5484099e7cc3077ed2bb5631d0f2f33f6df1e483 (diff)
downloaddtas-385563d1d99fda2735c78884ab135c8b77bc651a.tar.gz
"wall" is analogous to the wall(1) command, so we shall use that
instead of echo.
Diffstat (limited to 'lib/dtas/player.rb')
-rw-r--r--lib/dtas/player.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index 9ab45fc..6236be6 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -54,7 +54,7 @@ class DTAS::Player # :nodoc:
     @sources = @source_map.values.sort_by { |src| src.tryorder }
   end
 
-  def echo(msg)
+  def wall(msg)
     msg = xs(Array(msg))
     @watchers.delete_if do |io, _|
       if io.closed?
@@ -197,7 +197,7 @@ class DTAS::Player # :nodoc:
       do_seek(io, msg[0])
     when "clear"
       @queue.clear
-      echo("clear")
+      wall("clear")
       io.emit("OK")
     when "rg"
       rg_handler(io, msg)
@@ -372,13 +372,13 @@ class DTAS::Player # :nodoc:
       case source_spec
       when String
         pending = try_file(source_spec) or return
-        echo(%W(file #{pending.infile}))
+        wall(%W(file #{pending.infile}))
       when Array
         pending = try_file(*source_spec) or return
-        echo(%W(file #{pending.infile} #{pending.offset_samples}s))
+        wall(%W(file #{pending.infile} #{pending.offset_samples}s))
       else
         pending = DTAS::Source::Cmd.new(source_spec["command"])
-        echo(%W(command #{pending.command_string}))
+        wall(%W(command #{pending.command_string}))
       end
 
       dst = @sink_buf
@@ -394,7 +394,7 @@ class DTAS::Player # :nodoc:
 
   def player_idle
     @tl.reset
-    echo "idle"
+    wall("idle")
   end
 
   def drop_target(target)