Enable or disable the generation of PCM events
#include <sys/asoundlib.h> int snd_pcm_set_filter(snd_pcm_t *handle, int channel, const snd_pcm_filter_t * filter)
The snd_pcm_set_filter() function uses the snd_pcm_filter_t structure to set the mask of all PCM events for the channel that the handle was opened on. Only those events that are specified in the mask are tracked; all others are discarded as they occur.
You can arrange to have your application receive notification when an event occurs by calling select() on the channel. You can use snd_pcm_channel_read_event() to read the event's data.
EOK on success, a negative errno upon failure. The errno values are available in the errno.h file.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |