Skip to contentSkip to conversation

Can ALSA invoke a Callback ?

DISCUSSION Clemens Ladisch 1 participant 1 message Aug 26, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Ru Vuott

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.

Regards,
Clemens