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

Commit 6f7d56cf authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Fix an issue where a fixed number of bits per sample is used for seek position calculation."

parents cb171fab 39962393
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ status_t WAVSource::read(
    int64_t seekTimeUs;
    ReadOptions::SeekMode mode;
    if (options != NULL && options->getSeekTo(&seekTimeUs, &mode)) {
        int64_t pos = (seekTimeUs * mSampleRate) / 1000000 * mNumChannels * 2;
        int64_t pos = (seekTimeUs * mSampleRate) / 1000000 * mNumChannels * (mBitsPerSample >> 3);
        if (pos > mSize) {
            pos = mSize;
        }