MCPcopy Create free account
hub / github.com/android/ndk-samples / GetNativeAudioSampleRate

Method GetNativeAudioSampleRate

teapots/common/ndk_helper/JNIHelper.cpp:482–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482int32_t JNIHelper::GetNativeAudioSampleRate() {
483 if (activity_ == NULL) {
484 LOGI(
485 "JNIHelper has not been initialized. Call init() to initialize the "
486 "helper");
487 return 0;
488 }
489
490 JNIEnv* env = AttachCurrentThread();
491 jmethodID mid = env->GetMethodID(jni_helper_java_class_,
492 "getNativeAudioSampleRate", "()I");
493 int32_t i = env->CallIntMethod(jni_helper_java_ref_, mid);
494 return i;
495}
496
497//---------------------------------------------------------------------------
498// Misc implementations

Callers

nothing calls this directly

Calls 1

CallIntMethodMethod · 0.80

Tested by

no test coverage detected