aboutsummaryrefslogtreecommitdiff
path: root/utils/tinycap.c
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 21:39:53 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 21:39:53 -0800
commit053a009cab9ad0e440e511a1546e9cba415565d7 (patch)
tree8c9ee73c50c8eaba24c87389e0eb7d1754f492c8 /utils/tinycap.c
parentf42051ce4de1a3b2655c2cab778338fe66ee9580 (diff)
parent6860acb720fcc5d67639b72aa349b16e1fc6acc6 (diff)
Merge branch 'develop'
This merges all the changes for the 1.1.0 release to the master branch.
Diffstat (limited to 'utils/tinycap.c')
-rw-r--r--utils/tinycap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/tinycap.c b/utils/tinycap.c
index 503b118..05c7180 100644
--- a/utils/tinycap.c
+++ b/utils/tinycap.c
@@ -244,7 +244,7 @@ unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device,
pcm_format_to_bits(format));
}
- while (capturing && !pcm_read(pcm, buffer, size)) {
+ while (capturing && (pcm_readi(pcm, buffer, size) < 0)) {
if (capture_time > 0 &&
((bytes_read + size) > pcm_frames_to_bytes(pcm, capture_time * rate))) {
size = pcm_frames_to_bytes(pcm, capture_time * rate) - bytes_read;