summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_audiotrack.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-09-10 02:09:28 +0200
committerDudemanguy <random342@airmail.cc>2023-09-29 20:48:58 +0000
commit9606c3fca9d568dc43711017dcb35a408c0d2883 (patch)
tree6261962679c5b86514dc0e08193daed9ecd5fa03 /audio/out/ao_audiotrack.c
parent40e0fea6ebede9452a430cfd6d39bf132e89472d (diff)
downloadmpv-9606c3fca9d568dc43711017dcb35a408c0d2883.tar.bz2
mpv-9606c3fca9d568dc43711017dcb35a408c0d2883.tar.xz
timer: teach it about nanoseconds
Those changes will alow to change vsync base to more precise time base. In general there is no reason to truncate values returned by system.
Diffstat (limited to 'audio/out/ao_audiotrack.c')
-rw-r--r--audio/out/ao_audiotrack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_audiotrack.c b/audio/out/ao_audiotrack.c
index 9feceaec30..3fd68e5783 100644
--- a/audio/out/ao_audiotrack.c
+++ b/audio/out/ao_audiotrack.c
@@ -372,7 +372,7 @@ static uint32_t AudioTrack_getPlaybackHeadPosition(struct ao *ao)
return 0;
JNIEnv *env = MP_JNI_GET_ENV(ao);
uint32_t pos = 0;
- int64_t now = mp_raw_time_us() * 1000;
+ int64_t now = mp_raw_time_ns();
int state = MP_JNI_CALL_INT(p->audiotrack, AudioTrack.getPlayState);
int stable_count = 20;