diff --git a/src/emu/ovnidump.c b/src/emu/ovnidump.c index 10a36dc..5eb1155 100644 --- a/src/emu/ovnidump.c +++ b/src/emu/ovnidump.c @@ -23,7 +23,7 @@ emit(struct player *player) struct stream *stream = player_stream(player); /* Use raw clock in the ovni event */ - int64_t rel = ev->rclock - c; + int64_t rel = stream->deltaclock; c = ev->rclock; printf("%s %10ld %+10ld %c%c%c", diff --git a/src/emu/stream.c b/src/emu/stream.c index 76715b6..7e8a422 100644 --- a/src/emu/stream.c +++ b/src/emu/stream.c @@ -232,6 +232,7 @@ stream_step(struct stream *stream) } } + stream->deltaclock = clock - stream->lastclock; stream->lastclock = clock; return 0; diff --git a/src/emu/stream.h b/src/emu/stream.h index 93463da..2bbfd13 100644 --- a/src/emu/stream.h +++ b/src/emu/stream.h @@ -15,6 +15,7 @@ struct stream { uint8_t *buf; int64_t size; int64_t lastclock; + int64_t deltaclock; int64_t clock_offset; heap_node_t hh;