Skip to content

elliottwilliams/hallon-queue-output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hallon::QueueOutput

An audio driver for Hallon, a ruby client for libspotify. Streams audio into a ruby Queue, allowing your code to work directly with audio samples out of Hallon. One sample is an arrays of signed 16-bit integers, one for each channel.

Installation

$ gem install hallon-queue-output

Usage

Initialize a Hallon player and pass QueueOutput as the driver. Pass a &block as the second argument to set queue the driver should push into. (the block runs after Hallon creates the driver, where you would normally establish callbacks):

# After loading Hallon and creating a session...

require 'thread'
require 'hallon-queue-output'

my_queue = Queue.new

player = Hallon::Player.new Hallon::QueueOutput, Proc.new do
	@driver.queue = my_queue
end

##TODO

  • Support changes in format. Right now, playing a track not at 44.1khz will produce no output.

About

Stream Spotify via Hallon to ruby Queue for playback or processing in another thread.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages