[linux-audio-dev] Toward a modularization of audio component

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Toward a modularization of audio component
From: Abramo Bagnara (abramo_AT_alsa-project.org)
Date: Fri May 04 2001 - 01:21:43 EEST


In the past days I've thought a lot about whether, how and why current
alsa-lib PCM model is not suitable for all-in-a-process model (that
seems the only way to write applications with pseudo-RT needs).

The result is the following simple proposal.

The short resume is:
- every audio producer (a synthesizer, an mp3 file decoder, an hardware
capture stream, a .wav reader, etc.) have a PCM capture API
- every audio consumer (an mp3 file encoder, a .voc writer, an hardware
playback stream, etc.) have a PCM playback API

Following this model, by example an FX plugin is an audio producer that
take as input one ore more audio producers.

Now, suppose to rewrite aplay: it become a trivial application that copy
audio data from an audio producer to an audio consumer, but try to
imagine what it's able to do now:
- mp3 decoder/player (like mpg123)
- file converter (like sox)
- midi converter/player (like timidity)
- drop free sound recorder
- and everything you can imagine assembling our bricks

All that using perfectly reusable software modules (shared object).
The guideline is: we are no longer developing an application but an
object with a well known API.

Ok, but what about legacy application, xmms by example, how to transform
it in an audio producer?

In this case we'll fall back in the previous model (not suitable for
pseudo-RT needs): we'll insert a pcm_lbserver as audio consumer for
application xmms and our in-process audio producer will be a pcm_shm
linked to it.

-- 
Abramo Bagnara                       mailto:abramo_AT_alsa-project.org

Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy

ALSA project http://www.alsa-project.org It sounds good!


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri May 04 2001 - 02:00:05 EEST