diff --git a/libao2/ao_alsa1x.c b/libao2/ao_alsa1x.c index 5ed8f41ece..67f3ee3bd8 100644 --- a/libao2/ao_alsa1x.c +++ b/libao2/ao_alsa1x.c @@ -628,7 +628,7 @@ static int init(int rate_hz, int channels, int format, int flags) return(0); } else { - ao_data.buffersize = err; + ao_data.buffersize = err * bytes_per_sample; if (verbose>0) printf("alsa-init: got buffersize=%i\n", ao_data.buffersize); } diff --git a/libao2/ao_alsa9.c b/libao2/ao_alsa9.c index 5ed8f41ece..67f3ee3bd8 100644 --- a/libao2/ao_alsa9.c +++ b/libao2/ao_alsa9.c @@ -628,7 +628,7 @@ static int init(int rate_hz, int channels, int format, int flags) return(0); } else { - ao_data.buffersize = err; + ao_data.buffersize = err * bytes_per_sample; if (verbose>0) printf("alsa-init: got buffersize=%i\n", ao_data.buffersize); }