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
@@ -198,7 +198,7 @@ static void start(__attribute__((unused)) int sample_rate,
|
||||
pa_threaded_mainloop_unlock(mainloop);
|
||||
}
|
||||
|
||||
static void play(void *buf, int samples) {
|
||||
static int play(void *buf, int samples) {
|
||||
// debug(1,"pa_play of %d samples.",samples);
|
||||
// copy the samples into the queue
|
||||
size_t bytes_to_transfer = samples * 2 * 2;
|
||||
@@ -224,6 +224,7 @@ static void play(void *buf, int samples) {
|
||||
pa_stream_cork(stream, 0, stream_success_cb, mainloop);
|
||||
pa_threaded_mainloop_unlock(mainloop);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pa_delay(long *the_delay) {
|
||||
|
||||
Reference in New Issue
Block a user