diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2017-08-20 15:34:06 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2017-09-01 18:42:50 +0200 |
commit | 3bfba37ffff3f8efb11463435e03c8ea5f760189 (patch) | |
tree | cb6c41b83d491f22e09992e1dfa63e4c3d0c945f /src/common | |
parent | cff7622f5cd91bbb8e451831ad1e674d42d27c0b (diff) |
Corrected print messages in wave file processing.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/wave.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/wave.c b/src/common/wave.c index c9ec407..feae254 100644 --- a/src/common/wave.c +++ b/src/common/wave.c @@ -51,7 +51,7 @@ static void *record_child(void *arg) /* quit on error */ if (len < 0) { error: - fprintf(stderr, "Failed to write to recording wave file! (errno %d)\n", errno); + fprintf(stderr, "Failed to write to recording WAVE file! (errno %d)\n", errno); rec->finish = 1; return NULL; } @@ -87,7 +87,7 @@ static void *playback_child(void *arg) len = fread(play->buffer + play->buffer_writep, 1, to_read, play->fp); /* quit on error */ if (len < 0) { - fprintf(stderr, "Failed to read from playback wave file! (errno %d)\n", errno); + fprintf(stderr, "Failed to read from playback WAVE file! (errno %d)\n", errno); play->finish = 1; return NULL; } @@ -145,11 +145,11 @@ int wave_create_record(wave_rec_t *rec, const char *filename, int samplerate, in rc = pthread_create(&rec->tid, NULL, record_child, rec); if (rc < 0) { - fprintf(stderr, "Failed to create thread to record wave file! (errno %d)\n", errno); + fprintf(stderr, "Failed to create thread to record WAVE file! (errno %d)\n", errno); goto error; } - printf("*** Writing received audio to %s.\n", filename); + printf("*** Writing WAVE file to %s.\n", filename); return 0; @@ -303,11 +303,11 @@ int wave_create_playback(wave_play_t *play, const char *filename, int samplerate rc = pthread_create(&play->tid, NULL, playback_child, play); if (rc < 0) { - fprintf(stderr, "Failed to create thread to playback wave file! (errno %d)\n", errno); + fprintf(stderr, "Failed to create thread to playback WAVE file! (errno %d)\n", errno); goto error; } - printf("*** Replacing received audio by %s.\n", filename); + printf("*** Reading WAVE file from %s.\n", filename); return 0; @@ -339,7 +339,7 @@ int wave_write(wave_rec_t *rec, sample_t **samples, int length) to_write = (rec->buffer_size + rec->buffer_readp - rec->buffer_writep - 1) % rec->buffer_size; to_write /= 2 * rec->channels; if (to_write < length) - fprintf(stderr, "Record wave buffer overflow.\n"); + fprintf(stderr, "Record WAVE buffer overflow.\n"); else to_write = length; if (to_write == 0) @@ -492,7 +492,7 @@ void wave_destroy_record(wave_rec_t *rec) fclose(rec->fp); rec->fp = NULL; - printf("*** Received audio is written to WAVE file.\n"); + printf("*** WAVE file written.\n"); } void wave_destroy_playback(wave_play_t *play) |