about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-19 16:21:40 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-19 16:21:40 +0000
commit44b612807de3caa14e2cae6dcba7061091fed4ca (patch)
treeaaee7dbbf727e806aa49008e0a94b938632e418c /lib
parentb8fc27a6e58828721f0e6df78658c4d84bccba1a (diff)
downloaddtas-44b612807de3caa14e2cae6dcba7061091fed4ca.tar.gz
We should not leave sinks running when nothing is playing,
since that blocks the sound device from being used by others.
Diffstat (limited to 'lib')
-rw-r--r--lib/dtas/player.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb
index 62dde03..273e56b 100644
--- a/lib/dtas/player.rb
+++ b/lib/dtas/player.rb
@@ -387,12 +387,12 @@ class DTAS::Player # :nodoc:
       @current = pending
       @srv.wait_ctl(dst, :wait_readable)
     else
-      stop_sinks if @sink_buf.inflight == 0
       player_idle
     end
   end
 
   def player_idle
+    stop_sinks if @sink_buf.inflight == 0
     @tl.reset unless @paused
     wall("idle")
   end