From a4f8408150edf94b8ff684c6c383d87f99e77e76 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 13 Sep 2011 21:53:34 -0700 Subject: Use maxu to clamp PulseAudio's capture buffer size --- Alc/backends/pulseaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 252eed41..804ceacb 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -1134,8 +1134,7 @@ static ALCenum pulse_open_capture(ALCdevice *device, const ALCchar *device_name) data->samples = device->UpdateSize * device->NumUpdates; data->frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType); - if(data->samples < 100 * device->Frequency / 1000) - data->samples = 100 * device->Frequency / 1000; + data->samples = maxu(data->samples, 100 * device->Frequency / 1000); if(!(data->ring = CreateRingBuffer(data->frame_size, data->samples))) { -- cgit v1.2.3