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

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

Merge "Recording of non-linear formats is not supported"

parents 101334a6 954315a1
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -60,10 +60,9 @@ status_t AudioRecord::getMinFrameCount(
    // We double the size of input buffer for ping pong use of record buffer.
    size <<= 1;

    if (audio_is_linear_pcm(format)) {
    // Assumes audio_is_linear_pcm(format)
    uint32_t channelCount = popcount(channelMask);
    size /= channelCount * audio_bytes_per_sample(format);
    }

    *frameCount = size;
    return NO_ERROR;
@@ -205,11 +204,8 @@ status_t AudioRecord::set(
    uint32_t channelCount = popcount(channelMask);
    mChannelCount = channelCount;

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

    if (sessionId == 0 ) {
        mSessionId = AudioSystem::newAudioSessionId();