ALSA input blocking

There were always applications that complained about not being able to play sounds, because the sound device was already locked by another program. Some applications even queued the sounds and played them all immediately after the sound device was released. I tried to use dmix from ALSA but it didn’t want to work on my crappy integrated Intel sound card won’t work with it.

Last autumn, to solve those endless problems with applications locking the sound device, I bought a sound card with hardware mixing. It works like a charm.

However, there is one problem that I don’t quite understand: audio input locking. I am aware that mixing sound need a complex solution. But reading sound is like reading /dev/urandom, it would be a signal splitter, not mixer. The same data would go to two applications instead of one.

Somehow, the applications lock the sound input device, so I can’t use QEMU with sound and a VoIP client at the same time. Or use artsd in full duplex mode with a VoIP client.

Do I have to look for a card with hardware input splitting?

UPDATE: There’s an ALSA plugin that does the job, its name is dsnoop.

Advertisements

Author: automatthias

You won't believe what a skeptic I am.