Subject: Re: [linux-audio-dev] Another Annoying "How Do I Get Started" Question
From: Paul Winkler (slinkp23_AT_yahoo.com)
Date: Sat Jul 07 2001 - 21:15:14 EEST
Greg Berchin wrote:
>
> Hi, folks;
>
> I've been subscribed for a few weeks, sitting on the sidelines hoping that
> I would come up to speed with time, but I find that it's not happening. I
> just recently set up my first Linux system, (finally) installed the ALSA
> drivers, and seem to have everything up and running. (Some UNIX experience
> from long, long ago helped a lot.) But all of this is preliminary, and the
> knowledge that I've acquired still hasn't prepared me for what I am
> ultimately trying to do: incorporate my own realtime audio applications
> into the PC.
>
> Writing the applications is the easy part for me; I have a Master's degree
> in electrical engineering and have been writing DSP-based audio
> applications in assembly and C for nearly a decade. So I know what I'm
> doing, algorithmically speaking. But the part I'm having trouble with is
> the specifics of how to retrieve the raw audio samples from the sound card
> and how to send the processed audio samples to the sound card. I am not
> familiar enough with how a Linux PC operates to even know where to look. I
> see references to "threaded applications" and "callback routines"; I have
> to admit that I don't know what they mean. I have read every FAQ and HOWTO
> that I could find, but they either don't contain the information that I
> seek or I don't understand them if they do.
>
> Is there a resource somewhere that describes this process to someone who is
> learning from the ground up? As I said, I have no trouble with the
> processing routines; it's the I/O that's giving me fits.
As a user, may I humbly suggest that you take another approach?
Most existing linux signal-processing apps follow this model (read from
soundcard or file; process; write to soundcard or file). It's all very well and
good until you realize that if your signal processor is any good at all, users
will inevitably want to use it in combination with existing apps (hard disk
recorders, synthesizers, other dsp tools, etc), and it is very inconvenient to
do so - in fact it can't really be done in realtime.
So depending on what you want your project to do, I suggest one of the
following:
1) When writing dsp, write as much of it as possible as LADSPA plugins. You
won't have to deal with I/O at all, and your dsp will be useable with many
existing and future applications. The LADSPA project lives at
http://www.ladspa.org
2) If you're developing your own application, wait a bit until the dust settles
on all this LAAGA stuff. It seems we are quite close to having an
inter-application glue API ready for developers to use. When it is ready, you'll
be able to write an application that can be used cooperatively with other
applications in realtime, and you won't have to deal with the details of audio
hardware at all. I think it will be worth your while to wait.
-- ................... paul winkler .................... custom calendars & printing: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com
This archive was generated by hypermail 2b28 : Sat Jul 07 2001 - 15:23:10 EEST