diff options
author | Chris Robinson <[email protected]> | 2009-12-24 04:08:04 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-24 04:08:04 -0800 |
commit | accea119d987947de121a11bd7e33b5d6414d77c (patch) | |
tree | 05a2430d195bd39a92b60ca01a2476b6f0fbdeed | |
parent | 6ea7b43c902e67828bf56df5d3be4f70c2619dcf (diff) |
Update pulse capture ring buffer in 25ms chunks
-rw-r--r-- | Alc/pulseaudio.c | 3 |
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; |