Make the play function return a status (ignored for the present). Clean up audio_alsa by removing all the die calls and placing the alsa_mutex calls in pthread cleanup routines.

This commit is contained in:
Mike Brady
2018-07-29 13:45:42 +01:00
parent c91a991edd
commit ea20840d6c
11 changed files with 207 additions and 169 deletions
+2 -1
View File
@@ -54,7 +54,7 @@ static void start(__attribute__((unused)) int sample_rate,
}
}
static void play(void *buf, int samples) {
static int play(void *buf, int samples) {
// if the file is not open, try to open it.
char errorstring[1024];
if (fd == -1) {
@@ -73,6 +73,7 @@ static void play(void *buf, int samples) {
warn("Error %d opening the pipe named \"%s\": \"%s\".", errno, pipename, errorstring);
warned = 1;
}
return warned;
}
static void stop(void) {