mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-06-08 02:29:40 +08:00
Fix some warnings and build a single shared lib
This commit is contained in:
parent
8463b73ccc
commit
3396fd0f5f
81
Android.bp
81
Android.bp
@ -1,5 +1,6 @@
|
||||
filegroup {
|
||||
name: "v4aCommonFile",
|
||||
cc_defaults {
|
||||
name: "v4a_defaults",
|
||||
vendor: true,
|
||||
srcs: [
|
||||
// Main
|
||||
"src/viper/ViPER.cpp",
|
||||
@ -51,65 +52,37 @@ filegroup {
|
||||
"src/viper/utils/TimeConstDelay.cpp",
|
||||
"src/viper/utils/WaveBuffer.cpp",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "v4aDefaults",
|
||||
srcs: [
|
||||
":v4aCommonFile",
|
||||
export_include_dirs: [
|
||||
"src/include",
|
||||
],
|
||||
cflags: [
|
||||
"-O3",
|
||||
"-DNDEBUG",
|
||||
"-O2",
|
||||
"-DVIPER_VERSION=20240314",
|
||||
"-DAOSP_SOONG_BUILD",
|
||||
],
|
||||
header_libs: [
|
||||
"libhardware_headers",
|
||||
],
|
||||
lto: {
|
||||
// TODO: full was removed in https://android-review.googlesource.com/c/platform/build/soong/+/2609595
|
||||
thin: true,
|
||||
},
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libv4aidl_re",
|
||||
vendor: true,
|
||||
relative_install_path: "soundfx",
|
||||
defaults: [
|
||||
"aidlaudioeffectservice_defaults",
|
||||
"v4aDefaults",
|
||||
"-Wno-unused-parameter",
|
||||
],
|
||||
srcs: [
|
||||
"src/ViPER4Aidl.cpp",
|
||||
// AOSP
|
||||
":effectCommonFile",
|
||||
],
|
||||
cflags: [
|
||||
"-O3",
|
||||
"-DNDEBUG",
|
||||
"-DVIPER_VERSION=20240314",
|
||||
"-DAOSP_SOONG_BUILD",
|
||||
"-DBACKEND_NDK",
|
||||
],
|
||||
whole_static_libs: [
|
||||
"libaudio_aidl_conversion_common_ndk",
|
||||
"libstagefright_foundation",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libv4a_re",
|
||||
vendor: true,
|
||||
relative_install_path: "soundfx",
|
||||
defaults: [
|
||||
"v4aDefaults",
|
||||
],
|
||||
srcs: [
|
||||
"src/ViPER4Android.cpp",
|
||||
cppflags: [
|
||||
"-Wno-unused-parameter",
|
||||
],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
],
|
||||
header_libs: [
|
||||
"libaudioeffects",
|
||||
"libaudioutils_headers",
|
||||
],
|
||||
relative_install_path: "soundfx",
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libv4a_re",
|
||||
defaults: [
|
||||
"aidlaudioeffectservice_defaults",
|
||||
"v4a_defaults",
|
||||
],
|
||||
srcs: [
|
||||
":effectCommonFile",
|
||||
"src/ViPER4Aidl.cpp",
|
||||
"src/ViPER4Android.cpp",
|
||||
],
|
||||
}
|
||||
|
@ -1,11 +1,5 @@
|
||||
#include <cstring>
|
||||
|
||||
#ifdef AOSP_SOONG_BUILD
|
||||
#include <hardware/audio_effect.h>
|
||||
#else
|
||||
#include <essential.h>
|
||||
#endif
|
||||
|
||||
#include "viper/ViPER.h"
|
||||
#include <constants.h>
|
||||
#include "ViperContext.h"
|
||||
|
@ -2,11 +2,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
#ifdef AOSP_SOONG_BUILD
|
||||
#include <system/audio_effect.h>
|
||||
#else
|
||||
#include <essential.h>
|
||||
#endif
|
||||
#include "viper/ViPER.h"
|
||||
#include <string>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,11 +4,11 @@
|
||||
#include <log.h>
|
||||
|
||||
ViPER::ViPER() :
|
||||
adaptiveBuffer(2, 4096),
|
||||
waveBuffer(2, 4096),
|
||||
iirFilter(10),
|
||||
frameCount(0),
|
||||
samplingRate(VIPER_DEFAULT_SAMPLING_RATE),
|
||||
adaptiveBuffer(AdaptiveBuffer(2, 4096)),
|
||||
waveBuffer(WaveBuffer(2, 4096)),
|
||||
iirFilter(IIRFilter(10)),
|
||||
gainL(1.0),
|
||||
gainR(1.0) {
|
||||
ALOGI("Welcome to ViPER FX");
|
||||
|
@ -36,7 +36,7 @@ private:
|
||||
uint32_t unknown3;
|
||||
uint32_t unknown4;
|
||||
uint32_t currentKernelBufferCrc;
|
||||
int isQuadChannel;
|
||||
// int isQuadChannel;
|
||||
float crossChannel;
|
||||
bool isValidCrossChannel;
|
||||
uint32_t samplingRate;
|
||||
|
Loading…
x
Reference in New Issue
Block a user