[linux-audio-dev] I need help! I can't handle the problem about full-duplex (playback & record) programming

Paul Davis paul at linuxaudiosystems.com
Mon Dec 16 08:12:00 UTC 2002


>I'm so glad to see your reply. But I'm still wondering
>how I can implement the full duplex operation on sound
>card, i.e. playback and record audio on the same card
>at same time. I don't think it's a good idea that
>reopen the device when switch between reading and
>writting, because I found it sometime took much time
>to open the device and that means the quality wouldn't
>be good. Do u have another solution to it? Anybody
>have experience with it ? I really need suggestion
>about it and I also believe there must be some tricks
>which I havn't understood.

although there is a lot of experience with the OSS API here, i believe
that you will get more substantive feedback from this list by choosing
to use the ALSA API, which is the sound API in the 2.5 kernel (and
will be for 2.6 and all subsequent releases of a "stable"
kernel). most (not all!) of the developers here of full duplex
applications tend to use ALSA.

under ALSA, you open two "handles", one for read and one for
write. assuming that the card supports this in hardware (some cheap
soundblaster cards do not, for example), it works perfectly.

also, to repeat the perennial advertisement, if your application has
no reason to attach itself to a particular audio interface and might
benefit from being able to route data to/from other applications,
consider using JACK (http://jackit.sf.net/).

--p



More information about the Linux-audio-dev mailing list