Skip to content

Commit 77cdf79

Browse files
author
Shunkai Yao
committed
replace the hardcode for min/max sample rate with audio.h in jni
Bug: 350550320 Test: atest AudioRecordTest AudioFormatTest AudioTrackTest Change-Id: Ie1941eeb42cb2708af3b6294059fc8574e7359a8
1 parent 580721d commit 77cdf79

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/jni/android_media_AudioSystem.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2703,12 +2703,11 @@ static jint android_media_AudioSystem_getMaxChannelCount(JNIEnv *env, jobject th
27032703
}
27042704

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

27102709
static jint android_media_AudioSystem_getMinSampleRate(JNIEnv *env, jobject thiz) {
2711-
return 4000; // SAMPLE_RATE_HZ_MIN (for API)
2710+
return SAMPLE_RATE_HZ_MIN;
27122711
}
27132712

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

0 commit comments

Comments
 (0)