aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-26 07:42:16 -0800
committerChris Robinson <[email protected]>2009-12-26 07:42:16 -0800
commit89f59c0e1c37bd63745bb9ba8ea454391aa33344 (patch)
tree3f943b92301edac37af9542f544755890dd8d8db /Alc
parent3793919892e6d61e5fec3abeaaeebc3f2332be13 (diff)
Shorten a long line
Diffstat (limited to 'Alc')
-rw-r--r--Alc/pulseaudio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c
index 7687506f..621079f0 100644
--- a/Alc/pulseaudio.c
+++ b/Alc/pulseaudio.c
@@ -856,7 +856,11 @@ static void pulse_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint sa
/* Any unread data in the fragment will be lost, so save it */
length /= data->frame_size;
if(length > 0)
- WriteRingBuffer(data->ring, buf, (length<data->samples) ? length : data->samples);
+ {
+ if(length > data->samples)
+ length = data->samples;
+ WriteRingBuffer(data->ring, buf, length);
+ }
ppa_stream_drop(data->stream);
}