Skip to content
Browse files

Added more documentation

  • Loading branch information...
1 parent 81d5fcd commit 4d174700eda1e0edc6394504d3b8a9b335c9e182 @wedesoft committed Nov 17, 2010
Showing with 41 additions and 1 deletion.
  1. +41 −1 README.md
View
42 README.md
@@ -1,4 +1,44 @@
hornetseye-alsa
-======
+===============
+
+**Author**: Jan Wedekind
+**Copyright**: 2010
+**License**: GPL
+
+Synopsis
+--------
+
This Ruby extension provides an interface for playing audio data using ALSA.
+Installation
+------------
+
+To install the Hornetseye ALSA bindings, use the following command:
+
+ $ sudo gem install hornetseye-alsa
+
+You can install from source as follows:
+
+ $ rake
+ $ sudo rake install
+
+Usage
+-----
+
+Simply run Interactive Ruby:
+
+ $ irb
+
+You can load and use ALSA as shown below. This example will open microphone and
+speakers and then write the input of the microphone to the speakers.
+
+ require 'rubygems'
+ require 'hornetseye_alsa'
+ include Hornetseye
+ microphone = AlsaInput.new 'default:0' # or 'default:1' for USB microphone
+ speaker = AlsaOutput.new 'default:0', microphone.rate, microphone.channels
+ while true
+ frame = microphone.read 1024
+ speaker.write frame
+ end
+

0 comments on commit 4d17470

Please sign in to comment.
Something went wrong with that request. Please try again.