From 44b612807de3caa14e2cae6dcba7061091fed4ca Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 19 Sep 2013 16:21:40 +0000 Subject: player: stop sinks whenever we're out-of-tracks to play We should not leave sinks running when nothing is playing, since that blocks the sound device from being used by others. --- lib/dtas/player.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dtas') 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 -- cgit v1.2.3-24-ge0c7