The error callback can be called before the transition of the sink
state has completed. It therefore needs to wait until the sink has
left init state before reconfiguring it with pa_sink_suspend calls.
Also try to recover from all errors (and log what the error is when
it is not AAUDIO_ERROR_DISCONNECTED).
Add a sink module that makes use of the AAudio API, which is
available in Oreo or later.
The sink will have its sample rate and latency configured based on
the info we got with the API. They will also be updated accordingly
when the output device is changed.