aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tinycap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tinycap.c b/tinycap.c
index 8c9fcfb..be289d4 100644
--- a/tinycap.c
+++ b/tinycap.c
@@ -193,7 +193,7 @@ unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device,
return 0;
}
- size = pcm_get_buffer_size(pcm);
+ size = pcm_frames_to_bytes(pcm, pcm_get_buffer_size(pcm));
buffer = malloc(size);
if (!buffer) {
fprintf(stderr, "Unable to allocate %d bytes\n", size);