aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2020-04-24 13:44:14 -0400
committerTaylor Holberton <taylorcholberton@gmail.com>2020-04-24 13:44:14 -0400
commit6ef70e16da9c83db73861561d32830f6448db55d (patch)
tree05cf5516476ce4733c0b697913d582dc3ac691e3 /utils
parentb61b96003574c50bbeb8708718d3ef9f3ed08ddd (diff)
Waiting for PCM to finish before exiting
Diffstat (limited to 'utils')
-rw-r--r--utils/tinyplay.c2
1 files changed, 2 insertions, 0 deletions
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;
}