Skip to content

Commit

Permalink
Android 5.x向けにライブラリ名を変更
Browse files Browse the repository at this point in the history
JNI_OnLoad追加
  • Loading branch information
matsumo committed Jun 1, 2015
1 parent 0094954 commit 146b77b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opus/build.gradle
Expand Up @@ -28,7 +28,7 @@ android {
versionName "1.1.1"

ndk {
moduleName "opus"
moduleName "droidkit"

cFlags "-DANDROID_NDK " +
"-DDISABLE_IMPORTGL " +
Expand Down
2 changes: 1 addition & 1 deletion opus/src/main/java/com/droidkit/opus/OpusLib.java
Expand Up @@ -8,7 +8,7 @@
public class OpusLib {

static {
System.loadLibrary("opus");
System.loadLibrary("droidkit");
}

/**
Expand Down
10 changes: 10 additions & 0 deletions opus/src/main/jni/audio.c
Expand Up @@ -713,3 +713,13 @@ JNIEXPORT int Java_com_droidkit_opus_OpusLib_isOpusFile(JNIEnv *env, jclass clas

return result;
}

jint JNI_OnLoad(JavaVM *vm, void *reserved)
{
// Get JNI Env for all function calls
JNIEnv* env;
if ((*vm)->GetEnv(vm, (void **) &env, JNI_VERSION_1_6) != JNI_OK) {
return -1;
}
return JNI_VERSION_1_6;
}

0 comments on commit 146b77b

Please sign in to comment.