Skip to content

Commit

Permalink
changed so that -t alsa options apply only when the player is play, a…
Browse files Browse the repository at this point in the history
…nd put options at the end of the command
  • Loading branch information
oadams committed Sep 30, 2012
1 parent 0446357 commit 9ab1a03
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/playa/player.rb
Expand Up @@ -34,7 +34,7 @@ def select_player
#
@@options = {
'afplay' => [],
'play' => ['-q']
'play' => ['-q', '-t', 'alsa']
}
def play results = nil
# This is horribly complicated.
Expand Down Expand Up @@ -78,8 +78,7 @@ def play results = nil
channel.put :song => file
loop do
options = @@options[self.player]
child_pid = spawn self.player, *options, '-v', volume.to_s, file,
'-t', 'alsa'
child_pid = spawn self.player, '-v', volume.to_s, file, *options
Process.waitall
file = songs.next unless repeat_one
channel.put :song => file
Expand Down

0 comments on commit 9ab1a03

Please sign in to comment.