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

Method GetNativeAudioBufferSize

teapots/common/ndk_helper/JNIHelper.cpp:467–480  ·  view source on GitHub ↗

* Audio helpers */

Source from the content-addressed store, hash-verified

465 * Audio helpers
466 */
467int32_t JNIHelper::GetNativeAudioBufferSize() {
468 if (activity_ == NULL) {
469 LOGI(
470 "JNIHelper has not been initialized. Call init() to initialize the "
471 "helper");
472 return 0;
473 }
474
475 JNIEnv* env = AttachCurrentThread();
476 jmethodID mid = env->GetMethodID(jni_helper_java_class_,
477 "getNativeAudioBufferSize", "()I");
478 int32_t i = env->CallIntMethod(jni_helper_java_ref_, mid);
479 return i;
480}
481
482int32_t JNIHelper::GetNativeAudioSampleRate() {
483 if (activity_ == NULL) {

Callers

nothing calls this directly

Calls 1

CallIntMethodMethod · 0.80

Tested by

no test coverage detected