diff options
Diffstat (limited to 'libao2/ao_alsa1x.c')
-rw-r--r-- | libao2/ao_alsa1x.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libao2/ao_alsa1x.c b/libao2/ao_alsa1x.c index 67f3ee3bd8..b171c93dd8 100644 --- a/libao2/ao_alsa1x.c +++ b/libao2/ao_alsa1x.c @@ -59,6 +59,8 @@ static int alsa_fragsize = 4096; 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 @@ static int get_space() ret = 0; } + // workaround for too small value returned + if (ret < MIN_CHUNK_SIZE) + ret = 0; + return(ret); } |