On Wed, 28 Jun 2006, Takashi Iwai wrote: > At Tue, 27 Jun 2006 20:22:04 +0200, > Christophe Osuna wrote: > > > > Hi, > > > > I am trying to implement a simple mixer. Changing volume is fine but I > > am stuck with the callback for mixer events. > > > > I couldn't find lots of documentation, so I have tried to mimic what > > is done in alsamixer. However I must have missed something because it > > does not work. I only call snd_mixer_set_callback; it seems it is not > > enough but what else is needed? > > > > Below is a program just to show what I am trying to do. Could anyone > > give me hand with this? > > You need to call snd_mixer_handle_events() to trigger callbacks. > > Usually you wait via poll() or select() (with pollfd parameters > returned from snd_mixer_poll_descriptors()) then call > snd_mixer_handle_events(). An example code is in alsa-utils/amixer/amixer.c - events() and sevents() routines. Jaroslav ----- Jaroslav Kysela <perex@xxxxxxx> Linux Kernel Sound Maintainer ALSA Project, SUSE Labs Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel