ao_pipewire: switch to ao_read_data_nonblocking()

Avoid blocking the process callback as it runs with realtime privileges.
This commit is contained in:
Thomas Weißschuh 2023-11-05 08:59:26 +01:00 committed by sfan5
parent 4a134f441d
commit 5aa2068270
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ static void on_process(void *userdata)
end_time += (nframes * 1e9 / ao->samplerate) +
((double) time.delay * SPA_NSEC_PER_SEC * time.rate.num / time.rate.denom);
int samples = ao_read_data(ao, data, nframes, end_time);
int samples = ao_read_data_nonblocking(ao, data, nframes, end_time);
b->size = samples;
for (int i = 0; i < buf->n_datas; i++) {