Detecting alsa sequencer (dis)connects
Hello,
I want to have aconnectgui automatically update when changes have been mode in the alsa sequencer connections (for example by aconnect, or new applications being launched, or an application creating a new connection). What would be the correct way to do this? Maybe a polling alsa sequencer function that will tell me about changes?
Maarten
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]
At Tue, 14 May 2002 17:55:29 +0200,
Quoted 7 lines · Maarten de Boer
I want to have aconnectgui automatically update when changes have been mode in the alsa sequencer connections (for example by aconnect, or new applications being launched, or an application creating a new connection). What would be the correct way to do this? Maybe a polling alsa sequencer function that will tell me about changes?
you can connect a port of aconnectgui to the system port. the system port will broadcast a notification with SND_SEQ_EVENT_CLIENT/PORT_START, and PORT_SUBSCRIBED/UNSUBSCRIBED events if the corresponding action occurs. checking events can be done just like others via poll or select.
of course, it would be better to ignore the connection of aconnectgui itself and the system port.
Takashi
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]
Quoted 7 lines
you can connect a port of aconnectgui to the system port. the system port will broadcast a notification with SND_SEQ_EVENT_CLIENT/PORT_START, and PORT_SUBSCRIBED/UNSUBSCRIBED events if the corresponding action occurs. checking events can be done just like others via poll or select.
of course, it would be better to ignore the connection of aconnectgui itself and the system port.
Thanks Takashi, that works very well.
Maarten
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [email protected]