[alsa-devel] ALSA application programming: route audio from one PCM to another
gmane at colin.guthr.ie
Tue Apr 13 18:23:03 CEST 2010
'Twas brillig, and Stefan Schoenleitner at 13/04/10 16:23 did gyre and
> I finally managed to write an ALSA I/O plugin that does what I want.
> The plugin supports both playback and capture.
> Now I would like to write a simple audio application that takes audio
> * from the microphone and plays it back on my plugin
> * from the plugin (capture) and plays it back on the speakers
This sounds like something that would be more appropriate for jack
> Hence as long as the application is running, it should do the above.
> * Is there a special ALSA way to route audio from one PCM to another ?
> * If not, I suppose it would just work if I open the plugin PCM and the
> hw PCM at the same time and copy audio frames between them ?
Dealing with this can be quite complex, especially if the pcms are
clocked of different sources, you have to deal with a degree of
resampling to ensure that clock skew doesn't get out of control.
The module-loopback plugin in PulseAudio does a similar thing (routes
audio from a source to a sink) and as such has to deal with these clock
Tribalogic Limited [http://www.tribalogic.net/]
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the Alsa-devel