pulseaudio: Move to a threaded mainloop.

This used to create a context and mainloop for each device and the hotplug
thread, but this isn't correct use of PulseAudio's API. Now we have a
single context and a pa_threaded_mainloop, and all threads cooperate around
it.

This was originally from SDL3, in 35292d7dba.

Reference Issue #7883.
Reference Issue #7427.
This commit is contained in:
Ryan C. Gordon
2023-06-28 20:25:50 -04:00
parent 0ba93e4aac
commit 1453cfa4e9
2 changed files with 271 additions and 213 deletions
File diff suppressed because it is too large Load Diff
-2
View File
@@ -35,8 +35,6 @@ struct SDL_PrivateAudioData
char *device_name;
/* pulseaudio structures */
pa_mainloop *mainloop;
pa_context *context;
pa_stream *stream;
/* Raw mixing buffer */