Skip to content

Commit 3396fd0

Browse files
committed
Fix some warnings and build a single shared lib
1 parent 8463b73 commit 3396fd0

File tree

6 files changed

+24
-1191
lines changed

6 files changed

+24
-1191
lines changed

Android.bp

Lines changed: 19 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
filegroup {
2-
name: "v4aCommonFile",
1+
cc_defaults {
2+
name: "v4a_defaults",
3+
vendor: true,
34
srcs: [
45
// Main
56
"src/viper/ViPER.cpp",
@@ -51,65 +52,37 @@ filegroup {
5152
"src/viper/utils/TimeConstDelay.cpp",
5253
"src/viper/utils/WaveBuffer.cpp",
5354
],
54-
}
55-
56-
cc_defaults {
57-
name: "v4aDefaults",
58-
srcs: [
59-
":v4aCommonFile",
55+
export_include_dirs: [
56+
"src/include",
6057
],
6158
cflags: [
62-
"-O3",
63-
"-DNDEBUG",
59+
"-O2",
6460
"-DVIPER_VERSION=20240314",
65-
"-DAOSP_SOONG_BUILD",
66-
],
67-
header_libs: [
68-
"libhardware_headers",
69-
],
70-
lto: {
71-
// TODO: full was removed in https://android-review.googlesource.com/c/platform/build/soong/+/2609595
72-
thin: true,
73-
},
74-
}
7561

76-
cc_library_shared {
77-
name: "libv4aidl_re",
78-
vendor: true,
79-
relative_install_path: "soundfx",
80-
defaults: [
81-
"aidlaudioeffectservice_defaults",
82-
"v4aDefaults",
62+
"-Wno-unused-parameter",
8363
],
84-
srcs: [
85-
"src/ViPER4Aidl.cpp",
86-
// AOSP
87-
":effectCommonFile",
64+
cppflags: [
65+
"-Wno-unused-parameter",
8866
],
89-
cflags: [
90-
"-O3",
91-
"-DNDEBUG",
92-
"-DVIPER_VERSION=20240314",
93-
"-DAOSP_SOONG_BUILD",
94-
"-DBACKEND_NDK",
67+
shared_libs: [
68+
"liblog",
9569
],
96-
whole_static_libs: [
97-
"libaudio_aidl_conversion_common_ndk",
98-
"libstagefright_foundation",
70+
header_libs: [
71+
"libaudioeffects",
72+
"libaudioutils_headers",
9973
],
74+
relative_install_path: "soundfx",
10075
}
10176

10277
cc_library_shared {
10378
name: "libv4a_re",
104-
vendor: true,
105-
relative_install_path: "soundfx",
10679
defaults: [
107-
"v4aDefaults",
80+
"aidlaudioeffectservice_defaults",
81+
"v4a_defaults",
10882
],
10983
srcs: [
84+
":effectCommonFile",
85+
"src/ViPER4Aidl.cpp",
11086
"src/ViPER4Android.cpp",
11187
],
112-
shared_libs: [
113-
"liblog",
114-
],
11588
}

src/ViPER4Android.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#include <cstring>
2-
3-
#ifdef AOSP_SOONG_BUILD
42
#include <hardware/audio_effect.h>
5-
#else
6-
#include <essential.h>
7-
#endif
8-
93
#include "viper/ViPER.h"
104
#include <constants.h>
115
#include "ViperContext.h"

src/ViperContext.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
#include <vector>
44
#include <cstddef>
5-
#ifdef AOSP_SOONG_BUILD
65
#include <system/audio_effect.h>
7-
#else
8-
#include <essential.h>
9-
#endif
106
#include "viper/ViPER.h"
117
#include <string>
128

0 commit comments

Comments
 (0)