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 {
|
cc_defaults {
|
||||||
name: "v4aCommonFile",
|
name: "v4a_defaults",
|
||||||
|
vendor: true,
|
||||||
srcs: [
|
srcs: [
|
||||||
// Main
|
// Main
|
||||||
"src/viper/ViPER.cpp",
|
"src/viper/ViPER.cpp",
|
||||||
@ -51,65 +52,37 @@ filegroup {
|
|||||||
"src/viper/utils/TimeConstDelay.cpp",
|
"src/viper/utils/TimeConstDelay.cpp",
|
||||||
"src/viper/utils/WaveBuffer.cpp",
|
"src/viper/utils/WaveBuffer.cpp",
|
||||||
],
|
],
|
||||||
}
|
export_include_dirs: [
|
||||||
|
"src/include",
|
||||||
cc_defaults {
|
|
||||||
name: "v4aDefaults",
|
|
||||||
srcs: [
|
|
||||||
":v4aCommonFile",
|
|
||||||
],
|
],
|
||||||
cflags: [
|
cflags: [
|
||||||
"-O3",
|
"-O2",
|
||||||
"-DNDEBUG",
|
|
||||||
"-DVIPER_VERSION=20240314",
|
"-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 {
|
"-Wno-unused-parameter",
|
||||||
name: "libv4aidl_re",
|
|
||||||
vendor: true,
|
|
||||||
relative_install_path: "soundfx",
|
|
||||||
defaults: [
|
|
||||||
"aidlaudioeffectservice_defaults",
|
|
||||||
"v4aDefaults",
|
|
||||||
],
|
],
|
||||||
srcs: [
|
cppflags: [
|
||||||
"src/ViPER4Aidl.cpp",
|
"-Wno-unused-parameter",
|
||||||
// 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",
|
|
||||||
],
|
],
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"liblog",
|
"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>
|
#include <cstring>
|
||||||
|
|
||||||
#ifdef AOSP_SOONG_BUILD
|
|
||||||
#include <hardware/audio_effect.h>
|
#include <hardware/audio_effect.h>
|
||||||
#else
|
|
||||||
#include <essential.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "viper/ViPER.h"
|
#include "viper/ViPER.h"
|
||||||
#include <constants.h>
|
#include <constants.h>
|
||||||
#include "ViperContext.h"
|
#include "ViperContext.h"
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#ifdef AOSP_SOONG_BUILD
|
|
||||||
#include <system/audio_effect.h>
|
#include <system/audio_effect.h>
|
||||||
#else
|
|
||||||
#include <essential.h>
|
|
||||||
#endif
|
|
||||||
#include "viper/ViPER.h"
|
#include "viper/ViPER.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3,12 +3,12 @@
|
|||||||
#include <constants.h>
|
#include <constants.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
|
||||||
ViPER::ViPER() :
|
ViPER::ViPER() :
|
||||||
|
adaptiveBuffer(2, 4096),
|
||||||
|
waveBuffer(2, 4096),
|
||||||
|
iirFilter(10),
|
||||||
frameCount(0),
|
frameCount(0),
|
||||||
samplingRate(VIPER_DEFAULT_SAMPLING_RATE),
|
samplingRate(VIPER_DEFAULT_SAMPLING_RATE),
|
||||||
adaptiveBuffer(AdaptiveBuffer(2, 4096)),
|
|
||||||
waveBuffer(WaveBuffer(2, 4096)),
|
|
||||||
iirFilter(IIRFilter(10)),
|
|
||||||
gainL(1.0),
|
gainL(1.0),
|
||||||
gainR(1.0) {
|
gainR(1.0) {
|
||||||
ALOGI("Welcome to ViPER FX");
|
ALOGI("Welcome to ViPER FX");
|
||||||
|
@ -36,7 +36,7 @@ private:
|
|||||||
uint32_t unknown3;
|
uint32_t unknown3;
|
||||||
uint32_t unknown4;
|
uint32_t unknown4;
|
||||||
uint32_t currentKernelBufferCrc;
|
uint32_t currentKernelBufferCrc;
|
||||||
int isQuadChannel;
|
// int isQuadChannel;
|
||||||
float crossChannel;
|
float crossChannel;
|
||||||
bool isValidCrossChannel;
|
bool isValidCrossChannel;
|
||||||
uint32_t samplingRate;
|
uint32_t samplingRate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user