Skip to content

Commit

Permalink
bump aap-core and revised build setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Feb 16, 2024
1 parent c37ace7 commit a98acfc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 104 deletions.
44 changes: 18 additions & 26 deletions aap-juce-support.patch
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76b0075..eba94d3 100644
index 026037d..074184b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,6 +68,34 @@ add_subdirectory(external/JUCE)
@@ -68,6 +68,15 @@ add_subdirectory(external/JUCE)
add_subdirectory(external/clap-juce-extensions EXCLUDE_FROM_ALL)


+# begin AAP specifics -->
+if (DEFINED AAP_DIR)
+
+## They are needed in desktop too, for generate-aap-metadata.
+include_directories(
+ "${AAP_DIR}/include"
+)
+add_definitions([[-DJUCE_PUSH_NOTIFICATIONS_ACTIVITY="com/rmsl/juce/JuceActivity"]])
+find_package(androidaudioplugin REQUIRED CONFIG)
+include_directories(${AAP_DIR}/include)
+juce_add_modules(${AAP_JUCE_DIR}/aap-modules/aap_audio_processors)
+
+add_compile_definitions([[JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE=1]])
+
+if (ANDROID)
+ # dependencies
+ find_library(log "log")
+ find_library(android "android")
+ find_library(glesv2 "GLESv2")
+ find_library(egl "EGL")
+ set(cpufeatures_lib "cpufeatures")
+ set(oboe_lib "oboe")
+endif (ANDROID)
+message("AAP_DIR: ${AAP_DIR}")
+message("AAP_JUCE_DIR: ${AAP_JUCE_DIR}")
+
+else()
+message("AAP_DIR not defined: skipping AAP build.")
+endif()
+# <-- end AAP specifics

# common build fragment using macro

@@ -231,6 +259,30 @@ else ()
@@ -232,6 +241,41 @@ else ()
message(FATAL_ERROR "unsupported chip ${ADLplug_CHIP}")
endif()

Expand All @@ -48,13 +29,24 @@ index 76b0075..eba94d3 100644
+target_compile_definitions(${APP_NAME} PUBLIC
+ JUCEAAP_HAVE_AUDIO_PLAYHEAD_NEW_POSITION_INFO=1
+ JUCE_PUSH_NOTIFICATIONS=1
+ JUCE_PUSH_NOTIFICATIONS_ACTIVITY="com/rmsl/juce/JuceActivity"
+ JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE=1
+ )
+
+if (ANDROID)
+ target_include_directories(${APP_NAME} PRIVATE
+ "${ANDROID_NDK}/sources/android/cpufeatures"
+ "${OBOE_DIR}/include"
+ )
+
+ # dependencies
+ find_library(log "log")
+ find_library(android "android")
+ find_library(glesv2 "GLESv2")
+ find_library(egl "EGL")
+ set(cpufeatures_lib "cpufeatures")
+ set(oboe_lib "oboe")
+
+endif (ANDROID)
+
+target_link_libraries(${APP_NAME}
Expand Down Expand Up @@ -139,7 +131,7 @@ index d5914b1..67e8e89 100644
: MidiKeyboardComponent(state, orientation),
designated_note_color_((uint8_t)245, 0, 41, 0.5f)
diff --git a/external/ADLplug/sources/ui/components/midi_keyboard_ex.h b/external/ADLplug/sources/ui/components/midi_keyboard_ex.h
index f742ef6..3887945 100644
index f742ef6..ec878e9 100644
--- a/external/ADLplug/sources/ui/components/midi_keyboard_ex.h
+++ b/external/ADLplug/sources/ui/components/midi_keyboard_ex.h
@@ -6,12 +6,7 @@
Expand All @@ -152,7 +144,7 @@ index f742ef6..3887945 100644
-}
-
-class Midi_Keyboard_Ex : public ex::juce::MidiKeyboardComponent {
+class Midi_Keyboard_Ex : public juce::MidiKeyboardComponent {
+class Midi_Keyboard_Ex : public juce::MidiKeyboardComponent {
public:
Midi_Keyboard_Ex(MidiKeyboardState &state, Orientation orientation);
void highlight_note(unsigned note, unsigned velocity);
Expand Down
9 changes: 6 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ kotlin {

android {
namespace = "org.androidaudioplugin.ports.juce.adlplug_ae"
compileSdk = 34
compileSdk = libs.versions.android.compileSdk.get().toInteger()

defaultConfig {
minSdk = 29
targetSdk = 34
minSdk = libs.versions.android.minSdk.get().toInteger()
targetSdk = libs.versions.android.targetSdk.get().toInteger()
ndk {
abiFilters "x86_64", "arm64-v8a"
}
Expand All @@ -26,6 +26,9 @@ android {
}
}
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildFeatures {
prefab true
}
}

sourceSets {
Expand Down
68 changes: 0 additions & 68 deletions gradle/libs.versions.toml

This file was deleted.

1 change: 1 addition & 0 deletions gradle/libs.versions.toml
6 changes: 0 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties

0 comments on commit a98acfc

Please sign in to comment.