Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ace6feea authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioTimestamp: check zero sample rate in latency computation"

parents 489f1274 88595751
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ struct alignas(8) /* bug 29096183, bug 29108507 */ ExtendedTimestamp {
    }

    double getLatencyMs(uint32_t sampleRate, Location location1, Location location2) const {
        if (mTimeNs[location1] > 0 && mTimeNs[location2] > 0) {
        if (sampleRate > 0 && mTimeNs[location1] > 0 && mTimeNs[location2] > 0) {
            const int64_t frameDifference =
                    mPosition[location1] - mPosition[location2];
            const int64_t timeDifferenceNs =