From accea119d987947de121a11bd7e33b5d6414d77c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 24 Dec 2009 04:08:04 -0800 Subject: Update pulse capture ring buffer in 25ms chunks --- Alc/pulseaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Alc/pulseaudio.c') 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; -- cgit v1.2.3