mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-01-03 08:03:28 +08:00
Add ffts as a submodule (because this is what ViPER used)
This commit is contained in:
parent
942988d1b0
commit
8eed46db09
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "src/viper/kissfft"]
|
[submodule "src/viper/ffts"]
|
||||||
path = src/viper/kissfft
|
path = src/viper/ffts
|
||||||
url = git@github.com:mborgerding/kissfft.git
|
url = git@github.com:anthonix/ffts.git
|
||||||
|
@ -11,12 +11,8 @@ project("ViPER4Android")
|
|||||||
add_compile_definitions(VERSION_CODE=20221231)
|
add_compile_definitions(VERSION_CODE=20221231)
|
||||||
add_compile_definitions(VERSION_NAME="0.1.0")
|
add_compile_definitions(VERSION_NAME="0.1.0")
|
||||||
|
|
||||||
## KISS FFT
|
# FFTS
|
||||||
#set(KISSFFT_PKGCONFIG OFF)
|
add_subdirectory(src/viper/ffts)
|
||||||
#set(KISSFFT_STATIC ON)
|
|
||||||
#set(KISSFFT_TEST OFF)
|
|
||||||
#set(KISSFFT_TOOLS OFF)
|
|
||||||
#add_subdirectory(src/cpp/viper/kissfft)
|
|
||||||
|
|
||||||
# ViPERFX
|
# ViPERFX
|
||||||
include_directories(src/include)
|
include_directories(src/include)
|
||||||
|
1
src/viper/ffts
Submodule
1
src/viper/ffts
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit fe86885ecafd0d16eb122f3212403d1d5a86e24e
|
@ -3,8 +3,8 @@
|
|||||||
#include "PConvSingle.h"
|
#include "PConvSingle.h"
|
||||||
|
|
||||||
PConvSingle::PConvSingle() {
|
PConvSingle::PConvSingle() {
|
||||||
this->enabled = false;
|
this->instanceUsable = false;
|
||||||
this->segments = 0;
|
this->segmentCount = 0;
|
||||||
this->segmentSize = 0;
|
this->segmentSize = 0;
|
||||||
// this->data = nullptr;
|
// this->data = nullptr;
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ int PConvSingle::GetFFTSize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PConvSingle::GetSegmentCount() {
|
int PConvSingle::GetSegmentCount() {
|
||||||
return this->segments;
|
return this->segmentCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PConvSingle::GetSegmentSize() {
|
int PConvSingle::GetSegmentSize() {
|
||||||
@ -38,18 +38,18 @@ int PConvSingle::GetSegmentSize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PConvSingle::InstanceUsable() {
|
bool PConvSingle::InstanceUsable() {
|
||||||
return this->enabled;
|
return this->instanceUsable;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PConvSingle::LoadKernel(float *buf, int param_2, int segmentSize) {
|
int PConvSingle::LoadKernel(float *buf, int param_2, int segmentSize) {
|
||||||
if (buf != nullptr && param_2 > 0 && segmentSize > 0 && segmentSize % 2 == 0) {
|
if (buf != nullptr && param_2 > 0 && segmentSize > 0 && segmentSize % 2 == 0) {
|
||||||
this->enabled = false;
|
this->instanceUsable = false;
|
||||||
ReleaseResources();
|
ReleaseResources();
|
||||||
// this->data = new PConvData(); //(PConvData *) malloc(0x140); // TODO: Sizeof
|
this->data = new PConvData(); //(PConvData *) malloc(0x140); // TODO: Sizeof
|
||||||
this->segmentSize = segmentSize;
|
this->segmentSize = segmentSize;
|
||||||
int n = ProcessKernel(buf, param_2, 1);
|
int n = ProcessKernel(buf, param_2, 1);
|
||||||
if (n != 0) {
|
if (n != 0) {
|
||||||
this->enabled = true;
|
this->instanceUsable = true;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
ReleaseResources();
|
ReleaseResources();
|
||||||
@ -84,18 +84,20 @@ int PConvSingle::ProcessKernel(int param_2, float *param_3, int param_4, int par
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PConvSingle::ReleaseResources() {
|
void PConvSingle::ReleaseResources() {
|
||||||
// TODO
|
if (this->data != nullptr) {
|
||||||
this->enabled = false;
|
// TODO
|
||||||
this->segments = 0;
|
}
|
||||||
|
this->instanceUsable = false;
|
||||||
|
this->segmentCount = 0;
|
||||||
this->segmentSize = 0;
|
this->segmentSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PConvSingle::Reset() {
|
void PConvSingle::Reset() {
|
||||||
if (!this->enabled) return;
|
if (!this->instanceUsable) return;
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void PConvSingle::UnloadKernel() {
|
void PConvSingle::UnloadKernel() {
|
||||||
this->enabled = false;
|
this->instanceUsable = false;
|
||||||
ReleaseResources();
|
ReleaseResources();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class PConvSingle {
|
class PConvSingle {
|
||||||
|
struct PConvData {
|
||||||
|
|
||||||
|
};
|
||||||
public:
|
public:
|
||||||
PConvSingle();
|
PConvSingle();
|
||||||
|
|
||||||
@ -34,7 +37,8 @@ public:
|
|||||||
|
|
||||||
void UnloadKernel();
|
void UnloadKernel();
|
||||||
|
|
||||||
bool enabled;
|
bool instanceUsable;
|
||||||
int segments, segmentSize;
|
int segmentCount;
|
||||||
// PConvData *data; // TODO: Type
|
int segmentSize;
|
||||||
|
PConvData *data;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user