aboutsummaryrefslogtreecommitdiff
path: root/utils/tinyplay.c
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 20:27:41 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 20:27:41 -0800
commite0781f13a774d872b24435511e5199ec2186c769 (patch)
tree6d4ac1909300773326caba83c0ed9a09d9ad443e /utils/tinyplay.c
parentf9834eef249ff55ddb084b64a553ec4912d3709d (diff)
Replaced old calls to pcm_read and pcm_write
The newer pcm_readi and pcm_writei functions are now being used.
Diffstat (limited to 'utils/tinyplay.c')
-rw-r--r--utils/tinyplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/tinyplay.c b/utils/tinyplay.c
index db1b611..d0c1e36 100644
--- a/utils/tinyplay.c
+++ b/utils/tinyplay.c
@@ -409,7 +409,7 @@ int play_sample(struct ctx *ctx)
do {
num_read = fread(buffer, 1, size, ctx->file);
if (num_read > 0) {
- if (pcm_write(ctx->pcm, buffer, num_read)) {
+ if (pcm_writei(ctx->pcm, buffer, num_read) < 0) {
fprintf(stderr, "error playing sample\n");
break;
}