From 319a84845148f562f21d309b294d8ed1b7d86262 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 15:59:17 -0800 Subject: Added const specifier to mask The changed was brought on by to early commits to the PCM API. --- utils/tinypcminfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/tinypcminfo.c b/utils/tinypcminfo.c index 5b8db1f..0dd381d 100644 --- a/utils/tinypcminfo.c +++ b/utils/tinypcminfo.c @@ -129,7 +129,7 @@ int main(int argc, char **argv) for (i = 0; i < 2; i++) { struct pcm_params *params; - struct pcm_mask *m; + const struct pcm_mask *m; unsigned int min; unsigned int max; -- cgit v1.2.3-70-g09d2 From e0781f13a774d872b24435511e5199ec2186c769 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 20:27:41 -0800 Subject: Replaced old calls to pcm_read and pcm_write The newer pcm_readi and pcm_writei functions are now being used. --- utils/tinycap.c | 2 +- utils/tinyplay.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') 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; 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; } -- cgit v1.2.3-70-g09d2