From 6ef70e16da9c83db73861561d32830f6448db55d Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Fri, 24 Apr 2020 13:44:14 -0400 Subject: Waiting for PCM to finish before exiting --- utils/tinyplay.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/tinyplay.c') diff --git a/utils/tinyplay.c b/utils/tinyplay.c index dde3a21..9bedbab 100644 --- a/utils/tinyplay.c +++ b/utils/tinyplay.c @@ -421,6 +421,8 @@ int play_sample(struct ctx *ctx) } } while (!close && num_read > 0); + pcm_wait(ctx->pcm, -1); + free(buffer); return 0; } -- cgit v1.2.3