[alsa-devel] Can ALSA invoke a Callback ?

Clemens Ladisch clemens at ladisch.de
Sat Aug 27 00:03:27 CEST 2011

Ru Vuott wrote:
> Well, I 'm programming with Gambas 3.0 language. I 'm using
> a GUI.

Use snd_seq_poll_descriptors_count() and snd_seq_poll_descriptors() to
get one or more file descriptors and event masks for the sequencer
device; these file descriptors can be used to wait for events.

When you receive an event, check if the device is actually ready for
reading or writing by calling snd_seq_poll_descriptors_revents().

These functions are designed to be used with poll(); to use them with
Gambas, extract the file descriptors and their event masks from the pfds
array and call GB.Watch() with these values.


More information about the Alsa-devel mailing list