class Rack::Deflatermaus::Player
Constants
- PATH_TO_OVERTURE
Public Class Methods
new()
click to toggle source
# File lib/rack/deflatermaus/player.rb, line 8 def initialize @audite = Audite.new end
Public Instance Methods
play()
click to toggle source
# File lib/rack/deflatermaus/player.rb, line 12 def play @audite.load(PATH_TO_OVERTURE) @audite.start_stream # We need to do something (or just sleep) while the song plays in the # background thread. # # The song is 7:30, but sleeping `@audite.length_in_seconds` sleeps # longer than that. Sleeping for 5 minutes is safely under 7:30. sleep 60 * 5 @audite.stop_stream end