summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/pulseaudio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 5ca00893..17ecd3fd 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -628,7 +628,8 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na
data->attr.prebuf = -1;
data->attr.maxlength = -1;
data->attr.tlength = -1;
- data->attr.fragsize = data->frame_size * data->samples / 2;
+ data->attr.fragsize = min(data->frame_size * data->samples / 2,
+ 25 * device->Frequency / 1000);
data->stream_name = "Capture Stream";
data->spec.rate = device->Frequency;