# HG changeset patch # User Matti Hamalainen # Date 1211377428 -10800 # Node ID e99d3e8653dfdcb1fcd9c922e41e97019ffb747e # Parent 1e4d147bdc2ba23a0bd26e43ac6e95420e19e50f Remove the strange timeout function from ALSA plugin's mixer handling, this fixes problems with volume and balance setting in some cases where timeout caused pcm_element to become NULL prematurely. Not sure if there could be any adverse side-effects to this, though... diff -r 1e4d147bdc2b -r e99d3e8653df src/alsa/audio.c --- a/src/alsa/audio.c Wed May 21 16:42:00 2008 +0300 +++ b/src/alsa/audio.c Wed May 21 16:43:48 2008 +0300 @@ -68,8 +68,6 @@ static int prebuffer_size; GStaticMutex alsa_mutex = G_STATIC_MUTEX_INIT; -static guint mixer_timeout; - struct snd_format { unsigned int rate; unsigned int channels; @@ -463,20 +461,6 @@ return 0; } -static int alsa_mixer_timeout(void *data) -{ - if (mixer) - { - snd_mixer_close(mixer); - mixer = NULL; - pcm_element = NULL; - } - mixer_timeout = 0; - mixer_start = TRUE; - - return FALSE; -} - static void alsa_cleanup_mixer(void) { pcm_element = NULL; @@ -510,10 +494,6 @@ &lr); *l = ll; *r = lr; - - if (mixer_timeout) - gtk_timeout_remove(mixer_timeout); - mixer_timeout = gtk_timeout_add(5000, alsa_mixer_timeout, NULL); }