-
Notifications
You must be signed in to change notification settings - Fork 2
/
jni_exposer.h
35 lines (23 loc) · 910 Bytes
/
jni_exposer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include <jni.h>
extern JavaVM *g_VM;
void CreateContext();
void DeleteContext();
void CreateThreads();
void JoinThreads();
extern "C" {
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
g_VM = vm;
CreateContext();
return JNI_VERSION_1_6;
}
JNIEXPORT void JNICALL JNI_OnUnLoad(JavaVM *vm, void *reserved) {
DeleteContext();
}
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_open(JNIEnv *, jobject, jstring);
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_setSamplerate(JNIEnv *, jobject, int);
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_close(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_createThreads(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_joinThreads(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_mx_vrok_VrokServices_setupCallbacks(JNIEnv *, jobject, jobject);
}