mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +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:
parent
56d31ae190
commit
8f96169117
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user