Mercurial > audlegacy-plugins
changeset 2611:e99d3e8653df
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...
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 May 2008 16:43:48 +0300 |
parents | 1e4d147bdc2b |
children | 480ff5a3353c |
files | src/alsa/audio.c |
diffstat | 1 files changed, 0 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- 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); }