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

Commit 287ac573 authored by Dean Wheatley's avatar Dean Wheatley
Browse files

Support AudioRecord getMinBufferSize for compressed formats

Using audio_bytes_per_frame allows for compressed formats to be
supported.

Change-Id: I883fb537f73f76608cf72d8a84f80ee8d95e7e06
parent 352e1eb9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -574,7 +574,7 @@ static jint android_media_AudioRecord_get_min_buff_size(JNIEnv *env, jobject th
    if (result != NO_ERROR) {
        return -1;
    }
    return frameCount * channelCount * audio_bytes_per_sample(format);
    return frameCount * audio_bytes_per_frame(channelCount, format);
}

static jboolean android_media_AudioRecord_setInputDevice(