From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: Can ALSA invoke a Callback ? Date: Sat, 27 Aug 2011 00:03:27 +0200 Message-ID: <4E58182F.1090801@ladisch.de> References: <1314385032.22194.YahooMailClassic@web29616.mail.ird.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by alsa0.perex.cz (Postfix) with ESMTP id ACEF3103813 for ; Sat, 27 Aug 2011 00:03:50 +0200 (CEST) In-Reply-To: <1314385032.22194.YahooMailClassic@web29616.mail.ird.yahoo.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Ru Vuott Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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. Regards, Clemens