Class: LastFM::AudioOutput::MPG123

Inherits:
Object
  • Object
show all
Defined in:
lib/lastfm.rb

Overview

Code Incomplete

Instance Method Summary collapse

Constructor Details

#initialize(stream_url) ⇒ MPG123

Returns a new instance of MPG123.



394
395
396
# File 'lib/lastfm.rb', line 394

def initialize(stream_url)
  @stream_url = stream_url
end

Instance Method Details

#startObject



397
398
399
400
401
402
403
404
# File 'lib/lastfm.rb', line 397

def start
  # TODO put this on a separate thread
  command = "mpg123 #{@stream_url}" 
  puts command
  @pipe = IO.popen(command)
  @pid = @pipe.pid
  puts "PID: #{@pid}"
end