# HG changeset patch # User Eugene Zagidullin # Date 1202647966 -10800 # Node ID 9056897525e174464d474fbd649aa2551e04779d # Parent e84c4ee208ca8f5b530c398ef80cfb721454f7d1 pretend to be stopped when buffer is free. needed for correct waiting for free buffer diff -r e84c4ee208ca -r 9056897525e1 src/alsa/audio.c --- a/src/alsa/audio.c Sun Feb 10 14:47:39 2008 +0300 +++ b/src/alsa/audio.c Sun Feb 10 15:52:46 2008 +0300 @@ -29,6 +29,7 @@ * Many fixes and cleanups. */ +/*#define AUD_DEBUG*/ #include "alsa.h" #include @@ -143,7 +144,10 @@ if (!going || paused || alsa_pcm == NULL) return FALSE; - return snd_pcm_state(alsa_pcm) == SND_PCM_STATE_RUNNING; + return snd_pcm_state(alsa_pcm) == SND_PCM_STATE_RUNNING && + !paused && + !prebuffer && + get_thread_buffer_filled() > hw_period_size_in; } static int diff -r e84c4ee208ca -r 9056897525e1 src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Sun Feb 10 14:47:39 2008 +0300 +++ b/src/vorbis/vorbis.c Sun Feb 10 15:52:46 2008 +0300 @@ -34,10 +34,8 @@ */ #include "config.h" -/* -#define AUD_DEBUG -#define DEBUG -*/ +/*#define AUD_DEBUG +#define DEBUG*/ #define REMOVE_NONEXISTANT_TAG(x) if (x != NULL && !*x) { x = NULL; }