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
@@ -43,7 +43,7 @@ static void start(__attribute__((unused)) int sample_rate,
|
||||
fd = STDOUT_FILENO;
|
||||
}
|
||||
|
||||
static void play(void *buf, int samples) {
|
||||
static int play(void *buf, int samples) {
|
||||
char errorstring[1024];
|
||||
int warned = 0;
|
||||
int rc = write(fd, buf, samples * 4);
|
||||
@@ -52,6 +52,7 @@ static void play(void *buf, int samples) {
|
||||
warn("Error %d writing to stdout: \"%s\".", errno, errorstring);
|
||||
warned = 1;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void stop(void) {
|
||||
|
||||
Reference in New Issue
Block a user