Created
December 6, 2013 15:50
-
-
Save stuartnelson3/7826950 to your computer and use it in GitHub Desktop.
play mp3s passed as command line arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'audite' | |
player = Audite.new | |
player.events.on(:complete) do | |
# actions to complete after song finishes | |
end | |
player.events.on(:position_change) do |pos| | |
# puts "POSITION: #{pos} seconds level #{player.level}" | |
end | |
player.load ARGV | |
player.start_stream | |
player.thread.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment