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

Commit b90e8e35 authored by Shunkai Yao's avatar Shunkai Yao
Browse files

replace the hardcode for min/max sample rate with audio.h in jni

Bug: 350550320
Test: atest AudioRecordTest AudioFormatTest AudioTrackTest
Change-Id: Ie1941eeb42cb2708af3b6294059fc8574e7359a8
parent 8c8eb1e9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2703,12 +2703,11 @@ static jint android_media_AudioSystem_getMaxChannelCount(JNIEnv *env, jobject th
}

static jint android_media_AudioSystem_getMaxSampleRate(JNIEnv *env, jobject thiz) {
    // see frameworks/av/services/audiopolicy/common/include/policy.h
    return 192000; // SAMPLE_RATE_HZ_MAX (for API)
    return SAMPLE_RATE_HZ_MAX;
}

static jint android_media_AudioSystem_getMinSampleRate(JNIEnv *env, jobject thiz) {
    return 4000; // SAMPLE_RATE_HZ_MIN  (for API)
    return SAMPLE_RATE_HZ_MIN;
}

static std::vector<uid_t> convertJIntArrayToUidVector(JNIEnv *env, jintArray jArray) {