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:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user