3 Commits

Author SHA1 Message Date
Dan Albert
1bfbb64c01 Merge 2d36bf2ee3 into 38c889d999 2025-09-11 14:21:32 +00:00
Dan Albert
38c889d999 Increase warning level in native-midi. 2025-09-11 12:32:22 +00:00
Dan Albert
2d36bf2ee3 Increase warning level in native-codec. 2025-09-10 16:45:32 -07:00
3 changed files with 19 additions and 21 deletions

View File

@@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 3.22.1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -UNDEBUG")
include(AppLibrary)
add_library(native-codec-jni SHARED
looper.cpp
native-codec-jni.cpp)
add_app_library(native-codec-jni SHARED
looper.cpp
native-codec-jni.cpp
)
# Include libraries needed for native-codec-jni lib
target_link_libraries(native-codec-jni
android
log
mediandk
OpenMAXAL)
android
log
mediandk
OpenMAXAL
)

View File

@@ -199,7 +199,7 @@ void mylooper::handle(int what, void* obj) {
extern "C" {
jboolean Java_com_example_nativecodec_NativeCodec_createStreamingMediaPlayer(
JNIEnv* env, jclass clazz, jobject assetMgr, jstring filename) {
JNIEnv* env, jclass, jobject assetMgr, jstring filename) {
LOGV("@@@ create");
// convert Java string to UTF-8
@@ -269,7 +269,7 @@ jboolean Java_com_example_nativecodec_NativeCodec_createStreamingMediaPlayer(
// set the playing state for the streaming media player
void Java_com_example_nativecodec_NativeCodec_setPlayingStreamingMediaPlayer(
JNIEnv* env, jclass clazz, jboolean isPlaying) {
JNIEnv*, jclass, jboolean isPlaying) {
LOGV("@@@ playpause: %d", isPlaying);
if (mlooper) {
if (isPlaying) {
@@ -281,8 +281,7 @@ void Java_com_example_nativecodec_NativeCodec_setPlayingStreamingMediaPlayer(
}
// shut down the native media system
void Java_com_example_nativecodec_NativeCodec_shutdown(JNIEnv* env,
jclass clazz) {
void Java_com_example_nativecodec_NativeCodec_shutdown(JNIEnv*, jclass) {
LOGV("@@@ shutdown");
if (mlooper) {
mlooper->post(kMsgDecodeDone, &data, true /* flush */);
@@ -297,8 +296,7 @@ void Java_com_example_nativecodec_NativeCodec_shutdown(JNIEnv* env,
}
// set the surface
void Java_com_example_nativecodec_NativeCodec_setSurface(JNIEnv* env,
jclass clazz,
void Java_com_example_nativecodec_NativeCodec_setSurface(JNIEnv* env, jclass,
jobject surface) {
// obtain a native window from a Java surface
if (data.window) {
@@ -311,7 +309,7 @@ void Java_com_example_nativecodec_NativeCodec_setSurface(JNIEnv* env,
// rewind the streaming media player
void Java_com_example_nativecodec_NativeCodec_rewindStreamingMediaPlayer(
JNIEnv* env, jclass clazz) {
JNIEnv*, jclass) {
LOGV("@@@ rewind");
if (mlooper) {
mlooper->post(kMsgSeek, &data);

View File

@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.22.1)
project(native_midi LANGUAGES C CXX)
project(native_midi LANGUAGES CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -O0")
include(AppLibrary)
add_library(${PROJECT_NAME}
SHARED
add_app_library(${PROJECT_NAME}
SHARED
AppMidiManager.cpp
MainActivity.cpp
)