From d663a1c9de1df1df62d9007e04d886abd1bb5257 Mon Sep 17 00:00:00 2001 From: David Madl Date: Sun, 24 May 2026 10:57:09 +0200 Subject: [PATCH] fixup: add missing file RunAccelSample --- .../at/lockstep/player/util/RunAccelSample.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 app/src/main/java/at/lockstep/player/util/RunAccelSample.kt diff --git a/app/src/main/java/at/lockstep/player/util/RunAccelSample.kt b/app/src/main/java/at/lockstep/player/util/RunAccelSample.kt new file mode 100644 index 0000000..d3cb502 --- /dev/null +++ b/app/src/main/java/at/lockstep/player/util/RunAccelSample.kt @@ -0,0 +1,24 @@ +package at.lockstep.player.util + +data class RunAccelSample( + /** Nanoseconds since the current song started ([android.hardware.SensorEvent.timestamp] base). */ + val timestampNanos: Long, + /** ExoPlayer position in ms when this sample was taken — frozen while paused. */ + val positionMs: Long, + val values: FloatArray, +) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is RunAccelSample) return false + return timestampNanos == other.timestampNanos && + positionMs == other.positionMs && + values.contentEquals(other.values) + } + + override fun hashCode(): Int { + var result = timestampNanos.hashCode() + result = 31 * result + positionMs.hashCode() + result = 31 * result + values.contentHashCode() + return result + } +}