[LAD] Libraries for simple audio programming, libao, other options?

Stephen Cameron smcameron at yahoo.com
Fri May 4 04:02:11 UTC 2007

--- Stephen Sinclair <radarsat1 at gmail.com> wrote:

> > Anyway, just looking for suggestions, esp. if what
> > I've described so far seems wrong.
> Hi!
> If you're dead set on including audio in your program, and you are
> writing in C++, 

No, just C, but thanks anyhow, I'll keep it in mind
in case I ever convert over to C++.  C is more fun for
me though, and this is just for fun.


> An even easier way (imho) is to use Chuck, which is an audio language
> built for realtime audio.  You can write all your audio routines in
> it, and send messages to your Chuck program telling it when to fire
> events, using an OSC library such as LibLo.  It'll make your audio
> programming that much easier, the only difficulty is that you have to
> deal with controlling a separate process.  Anyways, I recommend it.
> http://ccrma.stanford.edu/software/stk/
> http://chuck.cs.princeton.edu/
> http://liblo.sourceforge.net/  (for talking to chuck from C)

That sounds interesting.  I messed with chuck for an hour or
two, maybe a year ago, just played with the examples that came
with it.  It struck me at the time as being one
of those things that looks deceptively simple, but that, given
enough effort, could be pushed pretty far out.

> I've personally been through the exercise of writing my own audio
> engine from scratch, and finally I'm convinced that using something
> like STK or Chuck makes things much easier and in the end more stable
> as well, so I just thought I'd share that with you.

Hmm.  I might be one of those people that has to learn the hard way,
just for my own satisfaction of knowing how things work.

In any case, I have the (probably rather naive) beginnings of
a 16 track mixer engine working based on one of the portaudio test
programs which I hacked up here: 


The scaling is a bit odd, I noticed... divides the sums by the
number of things summed, which, as that changes as sound clips
enter and leave the mix, tends to make it sound like somebody 
is violently twisting the knobs on a compressor.

Seems to use about 1% of the CPU, so that's cool.

-- steve

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Linux-audio-dev mailing list