mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-06-22 16:22:24 +08:00
Bump version to 0.7.0-alpha1
This commit is contained in:
@ -4,14 +4,13 @@
|
||||
#include "constants.h"
|
||||
|
||||
ViPER::ViPER() :
|
||||
updateProcessTime(false),
|
||||
processTimeMs(0),
|
||||
frameCount(0),
|
||||
samplingRate(VIPER_DEFAULT_SAMPLING_RATE),
|
||||
adaptiveBuffer(AdaptiveBuffer(2, 4096)),
|
||||
waveBuffer(WaveBuffer(2, 4096)),
|
||||
iirFilter(IIRFilter(10)) {
|
||||
VIPER_LOGI("Welcome to ViPER FX");
|
||||
VIPER_LOGI("Current version is %s (%d)", VERSION_NAME, VERSION_CODE);
|
||||
VIPER_LOGI("Current version is %d", VIPER_VERSION);
|
||||
|
||||
this->convolver.SetEnable(false);
|
||||
this->convolver.SetSamplingRate(this->samplingRate);
|
||||
@ -87,16 +86,11 @@ ViPER::ViPER() :
|
||||
this->frameScale = 1.0;
|
||||
this->leftPan = 1.0;
|
||||
this->rightPan = 1.0;
|
||||
this->updateProcessTime = false;
|
||||
this->processTimeMs = 0;
|
||||
this->frameCount = 0;
|
||||
}
|
||||
|
||||
void ViPER::process(std::vector<float>& buffer, uint32_t size) {
|
||||
if (this->updateProcessTime) {
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto now_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now);
|
||||
this->processTimeMs = now_ms.time_since_epoch().count();
|
||||
}
|
||||
this->frameCount += size;
|
||||
|
||||
uint32_t ret;
|
||||
float *tmpBuf;
|
||||
@ -190,10 +184,6 @@ void ViPER::DispatchCommand(int param, int val1, int val2, int val3, int val4, u
|
||||
signed char *arr) {
|
||||
VIPER_LOGD("Dispatch command: %d, %d, %d, %d, %d, %d, %p", param, val1, val2, val3, val4, arrSize, arr);
|
||||
switch (param) {
|
||||
case PARAM_SET_UPDATE_STATUS: {
|
||||
this->updateProcessTime = val1 != 0;
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_RESET_STATUS: {
|
||||
this->resetAllEffects();
|
||||
break;
|
||||
|
@ -33,8 +33,7 @@ public:
|
||||
void resetAllEffects();
|
||||
|
||||
//private:
|
||||
bool updateProcessTime;
|
||||
uint64_t processTimeMs;
|
||||
uint64_t frameCount;
|
||||
uint32_t samplingRate;
|
||||
|
||||
// Effects
|
||||
|
@ -8,19 +8,31 @@
|
||||
|
||||
#include "../log.h" // TODO: Remove this dependency
|
||||
|
||||
typedef enum {
|
||||
ARCH_UNKNOWN = 0,
|
||||
ARCH_ARM,
|
||||
ARCH_ARM64,
|
||||
ARCH_X86,
|
||||
ARCH_X86_64,
|
||||
} arch_t;
|
||||
|
||||
#if defined(__arm__)
|
||||
#define VIPER_ARCHITECTURE "ARM"
|
||||
#define VIPER_ARCHITECTURE ARCH_ARM
|
||||
#elif defined(__aarch64__)
|
||||
#define VIPER_ARCHITECTURE "ARM64"
|
||||
#define VIPER_ARCHITECTURE ARCH_ARM64
|
||||
#elif defined(__i386__)
|
||||
#define VIPER_ARCHITECTURE "x86"
|
||||
#define VIPER_ARCHITECTURE ARCH_X86
|
||||
#elif defined(__x86_64__)
|
||||
#define VIPER_ARCHITECTURE "x86_64"
|
||||
#define VIPER_ARCHITECTURE ARCH_X86_64
|
||||
#else
|
||||
#error "Unknown architecture"
|
||||
// Note from the developer:
|
||||
// There's no architecture dependent code in ViPER4Android, this is just for debugging purposes.
|
||||
// Feel free to add your architecture if it's not listed here.
|
||||
#warning "Unknown architecture"
|
||||
#define VIPER_ARCHITECTURE ARCH_UNKNOWN
|
||||
/*
|
||||
* Note from the developer:
|
||||
*
|
||||
* There's no architecture dependent code in ViPER4Android, this is just for debugging purposes.
|
||||
* Feel free to add your architecture if it's not listed here
|
||||
*/
|
||||
#endif
|
||||
|
||||
#define VIPER_NAME "ViPER4Android"
|
||||
|
Reference in New Issue
Block a user