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

Commit 99ef241a authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Permit AudioRecord to support non-linear formats in future"

parents 9f474b78 c85df82b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -203,8 +203,11 @@ status_t AudioRecord::set(
    uint32_t channelCount = popcount(channelMask);
    mChannelCount = channelCount;

    // Assumes audio_is_linear_pcm(format), else sizeof(uint8_t)
    if (audio_is_linear_pcm(format)) {
        mFrameSize = channelCount * audio_bytes_per_sample(format);
    } else {
        mFrameSize = sizeof(uint8_t);
    }

    // validate framecount
    size_t minFrameCount;