Post by Simon Elli » Fri, 02 Dec 2005 23:28:40

I'm developing some ALSA code and looking at snd_async_add_pcm_handler.

The docs suggest that this internally uses SIGIO. I'm not sure what the
implications of this are when used in library code:

1. Does it mean that my app should not use SIGIO for other purposes?

2. Does it mean that my app can't open two sound cards each of which
use snd_async_add_pcm_handler? Looking at the docs and examples, it
would seem that I can open as many sound cards as I like and register
callbacks for each of them.

3. I've always steered clear of using signals in library code, because
I'm not sure of the implications if the user wants to use the same set
of signals in his app. Are there any ground rules for using signals
safely and sensibly in a library?

Simon Elliott