RubyAlsa?
ruby-alsa is a ruby binding of ALSA library.
Features
- native mapping performed with ruby-ffi
- PCM Playback and Capture "high level" API
Examples
Play a raw audio content :
Playback.open do |playback|
playback.write do |length|
$stdin.read(length)
end
end
Capture an audio content :
Capture.open do |capture|
capture.read do |buffer, frame_count|
$stdout.write buffer
end
end
Install
As a gem
ruby-alsa gem is available on GemCutter :
gem install ruby-alsa
Sources
This project is released under GNU General public License 3 by Tryphon.
The sources are available in a git repository :
git clone git://projects.tryphon.eu/ruby-alsa