]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Little cleanups in callbacks...
authorJaroslav Kysela <perex@perex.cz>
Thu, 29 Oct 1998 22:50:10 +0000 (22:50 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 29 Oct 1998 22:50:10 +0000 (22:50 +0000)
alsamixer/alsamixer.c

index 69a9d39ad6e42589f33eb06c9913df82c170e105..de173b68fdffd93c2d09cd884c97c2afc3a36fbe 100644 (file)
@@ -596,6 +596,7 @@ mixer_init (void)
 static void
 mixer_iteration_update(void *dummy, int channel)
 {
+  fprintf( stderr, "*** channel = %i\n", channel );
   mixer_update_cbar(channel);
   refresh ();
 }
@@ -603,15 +604,14 @@ mixer_iteration_update(void *dummy, int channel)
 static int
 mixer_iteration (void)
 {
-  static snd_mixer_callbacks_t callbacks = {
-    NULL,
-    mixer_iteration_update,
-  };
+  snd_mixer_callbacks_t callbacks;
   int key;
   int finished = 0;
   int mixer_fd;
   fd_set in;
 
+  bzero( &callbacks, sizeof( callbacks ) );
+  callbacks.channel_was_changed = mixer_iteration_update;
   mixer_fd = snd_mixer_file_descriptor( mixer_handle );
   while ( 1 ) {
     FD_ZERO(&in);