diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-11 13:45:40 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-16 15:38:59 +0000 |
commit | 50025428b17e82c9689dab82fcd0486648c4a9fd (patch) | |
tree | f9039f4110dd54be060b5e7ef4ef3131be0a3e32 /audio/out/ao_opensles.c | |
parent | d310430332b9c7dbedf28398b7018364401d327d (diff) | |
download | mpv-50025428b17e82c9689dab82fcd0486648c4a9fd.tar.bz2 mpv-50025428b17e82c9689dab82fcd0486648c4a9fd.tar.xz |
ao: convert all timing code to nanoseconds
Pull AOs work off of a callback that relies on mpv's internal timer. So
like with the related video changes, convert all of these to nanoseconds
instead. In many cases, the underlying audio API does actually provide
nanosecond resolution as well.
Diffstat (limited to 'audio/out/ao_opensles.c')
-rw-r--r-- | audio/out/ao_opensles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_opensles.c b/audio/out/ao_opensles.c index 1348cebffb..9ade73c857 100644 --- a/audio/out/ao_opensles.c +++ b/audio/out/ao_opensles.c @@ -82,7 +82,7 @@ static void buffer_callback(SLBufferQueueItf buffer_queue, void *context) 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); + mp_time_ns() + MP_TIME_S_TO_NS(delay)); res = (*buffer_queue)->Enqueue(buffer_queue, p->buf, p->bytes_per_enqueue); if (res != SL_RESULT_SUCCESS) |