Skip to content

Commit

Permalink
# Change JNI method names (com_google_oboe_sample_)
Browse files Browse the repository at this point in the history
  • Loading branch information
dturner committed Jun 24, 2020
1 parent fcc7d1d commit 3b57d2f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions samples/RhythmGame/src/main/cpp/native-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
std::unique_ptr<Game> game;

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_MainActivity_native_1onStart(JNIEnv *env, jobject instance,
Java_com_google_oboe_samples_rhythmgame_MainActivity_native_1onStart(JNIEnv *env, jobject instance,
jobject jAssetManager) {

AAssetManager *assetManager = AAssetManager_fromJava(env, jAssetManager);
Expand All @@ -41,27 +41,27 @@ Java_com_google_oboe_sample_rhythmgame_MainActivity_native_1onStart(JNIEnv *env,
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_RendererWrapper_native_1onSurfaceCreated(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_RendererWrapper_native_1onSurfaceCreated(JNIEnv *env,
jobject instance) {
game->onSurfaceCreated();
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_RendererWrapper_native_1onSurfaceChanged(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_RendererWrapper_native_1onSurfaceChanged(JNIEnv *env,
jclass type,
jint width,
jint height) {
game->onSurfaceChanged(width, height);
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_RendererWrapper_native_1onDrawFrame(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_RendererWrapper_native_1onDrawFrame(JNIEnv *env,
jclass type) {
game->tick();
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_GameSurfaceView_native_1onTouchInput(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_GameSurfaceView_native_1onTouchInput(JNIEnv *env,
jclass type,
jint event_type,
jlong time_since_boot_ms,
Expand All @@ -71,23 +71,23 @@ Java_com_google_oboe_sample_rhythmgame_GameSurfaceView_native_1onTouchInput(JNIE
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_GameSurfaceView_native_1surfaceDestroyed__(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_GameSurfaceView_native_1surfaceDestroyed__(JNIEnv *env,
jclass type) {
game->onSurfaceDestroyed();
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_MainActivity_native_1onStop(JNIEnv *env, jobject instance) {
Java_com_google_oboe_samples_rhythmgame_MainActivity_native_1onStop(JNIEnv *env, jobject instance) {

game->stop();
}

JNIEXPORT void JNICALL
Java_com_google_oboe_sample_rhythmgame_MainActivity_native_1setDefaultStreamValues(JNIEnv *env,
Java_com_google_oboe_samples_rhythmgame_MainActivity_native_1setDefaultStreamValues(JNIEnv *env,
jclass type,
jint sampleRate,
jint framesPerBurst) {
oboe::DefaultStreamValues::SampleRate = (int32_t) sampleRate;
oboe::DefaultStreamValues::FramesPerBurst = (int32_t) framesPerBurst;
}
} // extern "C"
} // extern "C"

0 comments on commit 3b57d2f

Please sign in to comment.