# HG changeset patch # User filon # Date 1042223298 0 # Node ID b8551709823d30fa8e88f5ee061840ad47ba376a # Parent d614cfb52a42efa60ff7bc37c701b05be475f01e Workaround for returning very litte buffer space. diff -r d614cfb52a42 -r b8551709823d libao2/ao_alsa1x.c --- a/libao2/ao_alsa1x.c Fri Jan 10 17:17:41 2003 +0000 +++ b/libao2/ao_alsa1x.c Fri Jan 10 18:28:18 2003 +0000 @@ -59,6 +59,8 @@ static int alsa_fragcount = 16; static int chunk_size = 1024; //is alsa_fragsize / 4 +#define MIN_CHUNK_SIZE 1024 + static size_t bits_per_sample, bytes_per_sample, bits_per_frame; static size_t chunk_bytes; @@ -1084,6 +1086,10 @@ ret = 0; } + // workaround for too small value returned + if (ret < MIN_CHUNK_SIZE) + ret = 0; + return(ret); } diff -r d614cfb52a42 -r b8551709823d libao2/ao_alsa9.c --- a/libao2/ao_alsa9.c Fri Jan 10 17:17:41 2003 +0000 +++ b/libao2/ao_alsa9.c Fri Jan 10 18:28:18 2003 +0000 @@ -59,6 +59,8 @@ static int alsa_fragcount = 16; static int chunk_size = 1024; //is alsa_fragsize / 4 +#define MIN_CHUNK_SIZE 1024 + static size_t bits_per_sample, bytes_per_sample, bits_per_frame; static size_t chunk_bytes; @@ -1084,6 +1086,10 @@ ret = 0; } + // workaround for too small value returned + if (ret < MIN_CHUNK_SIZE) + ret = 0; + return(ret); }