1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef _Included_org_drrickorang_loopback_jni
18 #define _Included_org_drrickorang_loopback_jni
19 
20 #include <jni.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 ////////////////////////
28 JNIEXPORT jobject JNICALL
29 Java_org_drrickorang_loopback_NativeAudioThread_nativeComputeDefaultSettings
30 (JNIEnv *, jobject, jint bytesPerFrame, jint threadType, jint performanceMode);
31 
32 JNIEXPORT jlong JNICALL Java_org_drrickorang_loopback_NativeAudioThread_nativeInit
33   (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jdouble, jobject byteBuffer,
34    jshortArray loopbackTone, jint maxRecordedLateCallbacks, jint ignoreFirstFrames);
35 
36 JNIEXPORT jint JNICALL Java_org_drrickorang_loopback_NativeAudioThread_nativeProcessNext
37   (JNIEnv *, jobject, jlong, jdoubleArray, jlong);
38 
39 JNIEXPORT jint JNICALL Java_org_drrickorang_loopback_NativeAudioThread_nativeDestroy
40   (JNIEnv *, jobject, jlong);
41 
42 JNIEXPORT jintArray JNICALL
43         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetRecorderBufferPeriod
44   (JNIEnv *, jobject, jlong);
45 
46 JNIEXPORT jint JNICALL
47         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetRecorderMaxBufferPeriod
48   (JNIEnv *, jobject, jlong);
49 
50 JNIEXPORT jdouble JNICALL
51         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetRecorderVarianceBufferPeriod
52   (JNIEnv *, jobject, jlong);
53 
54 JNIEXPORT jintArray JNICALL
55         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetPlayerBufferPeriod
56   (JNIEnv *, jobject, jlong);
57 
58 JNIEXPORT jint JNICALL
59         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetPlayerMaxBufferPeriod
60   (JNIEnv *, jobject, jlong);
61 
62 JNIEXPORT jdouble JNICALL
63         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetPlayerVarianceBufferPeriod
64   (JNIEnv *, jobject, jlong);
65 
66 JNIEXPORT jint JNICALL
67         Java_org_drrickorang_loopback_NativeAudioThread_nativeGetCaptureRank
68   (JNIEnv *, jobject, jlong);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif //_Included_org_drrickorang_loopback_jni
75