whisper.android.java : fix returns in JNI (#1929)

This commit is contained in:
zhouwg 2024-03-05 21:59:26 +08:00 committed by GitHub
parent ccd7c1d2da
commit f22d27a385
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -245,6 +245,8 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchMemcpy(JNIEnv *env, jobject thi
UNUSED(thiz);
const char *bench_ggml_memcpy = whisper_bench_memcpy_str(n_threads);
jstring string = (*env)->NewStringUTF(env, bench_ggml_memcpy);
return string;
}
JNIEXPORT jstring JNICALL
@ -253,5 +255,7 @@ Java_com_whispercpp_java_whisper_WhisperLib_benchGgmlMulMat(JNIEnv *env, jobject
UNUSED(thiz);
const char *bench_ggml_mul_mat = whisper_bench_ggml_mul_mat_str(n_threads);
jstring string = (*env)->NewStringUTF(env, bench_ggml_mul_mat);
return string;
}