summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2024-02-25 15:35:29 +0100
committersfan5 <sfan5@live.de>2024-02-28 16:11:54 +0100
commit87d30899ffae3ebad4d35ae362fb6cb8511c5d02 (patch)
treef9f52618b5baabf5ce2d645bc7fb5b23e5ac6121
parent3c1c848c2b95489e7aa8b2f7be8b7720f9f317f3 (diff)
downloadmpv-87d30899ffae3ebad4d35ae362fb6cb8511c5d02.tar.bz2
mpv-87d30899ffae3ebad4d35ae362fb6cb8511c5d02.tar.xz
ao_audiotrack: remove two dead variables
-rw-r--r--audio/out/ao_audiotrack.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/audio/out/ao_audiotrack.c b/audio/out/ao_audiotrack.c
index c9531a0a66..efc8aa19c1 100644
--- a/audio/out/ao_audiotrack.c
+++ b/audio/out/ao_audiotrack.c
@@ -57,9 +57,6 @@ struct priv {
bool cfg_pcm_float;
int cfg_session_id;
- bool needs_timestamp_offset;
- int64_t timestamp_offset;
-
bool thread_terminate;
bool thread_created;
mp_thread thread;
@@ -407,11 +404,6 @@ static uint32_t AudioTrack_getPlaybackHeadPosition(struct ao *ao)
int64_t time = MP_JNI_GET_LONG(p->timestamp, AudioTimestamp.nanoTime);
if (time == 0)
fpos = pos = 0;
- if (p->needs_timestamp_offset) {
- if (time != 0 && !p->timestamp_offset)
- p->timestamp_offset = now - time;
- time += p->timestamp_offset;
- }
if (fpos != 0 && time != 0 && state == AudioTrack.PLAYSTATE_PLAYING) {
double diff = (double)(now - time) / 1e9;
pos += diff * ao->samplerate;
@@ -816,7 +808,6 @@ static void stop(struct ao *ao)
p->written_frames = 0;
p->timestamp_fetched = 0;
p->timestamp_set = false;
- p->timestamp_offset = 0;
}
static void start(struct ao *ao)