1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

ao_opensles: fix delayed audio

This was forgotten in commit 5a8c48fde2
when the number of buffers was reduced to 1.
This commit is contained in:
sfan5 2019-08-15 15:36:16 +02:00 committed by Jan Ekström
parent 56d31ae190
commit 8f96169117

View File

@ -79,7 +79,7 @@ static void buffer_callback(SLBufferQueueItf buffer_queue, void *context)
pthread_mutex_lock(&p->buffer_lock);
delay = 2 * p->frames_per_enqueue / (double)ao->samplerate;
delay = p->frames_per_enqueue / (double)ao->samplerate;
delay += p->audio_latency;
ao_read_data(ao, &p->buf, p->frames_per_enqueue,
mp_time_us() + 1000000LL * delay);