cl-alsa
CL-ALSA
cl-alsa is a package for common lisp that provides a flexible interface to the Alsa sound system.
Authors
History
| Date |
Notes |
| 05/06/07 |
Version 0.01 release |
Features
- High level lisp interface to PCM device
- Quite fast (but could be faster still, see HELP WANTED)
- Uses CFFI
- Tested on SBCL
- Should support signed and unsigned 16 bit integers as input samples
- Interleaved and Non-interleaved
- Reasonable defaults assumed when opening PCM devices.
Example Usage
Limitations
- A lot more input formats could be supported, but I haven't got around to adding them (like signed/unsigned 8 bit, floating point, etc)
- Only works in blocking mode right now (no non-blocking support, nor asyncronous-callback-driven support)
- No support for ALSA sequencer.
- No (external to package) support for querying the hardware for capabilities (I've got preliminarys, but no nice interface built).
- I've only tested the system with 16 bit unsigned interleaved stereo data. If you're using that kind of audio data, your golden, if not, you maybe have some work
to do.
Download
Help Wanted
I've used the profiller and gotten the function cache-fill (in pcm.lisp) to be working quite quickly; most of the cpu time spent is in this function, where we copy our lisp data over to a C buffer, which then gets written to the ALSA PCM ring buffer. Any speedup we can get in that function is beneficial. This problem may go away when/if the proposed cffi:sys extension gets completed, since this extension offers a directed Lisp array -> C array translation function.