mirror of https://github.com/mpv-player/mpv
ao_pipewire: switch to ao_read_data_nonblocking()
Avoid blocking the process callback as it runs with realtime privileges.
This commit is contained in:
parent
4a134f441d
commit
5aa2068270
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue