mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-01-03 16:13:35 +08:00
Update
This commit is contained in:
parent
2d85d11792
commit
55722aa955
@ -10,11 +10,10 @@
|
||||
#define VIPER_EFFECT_NAME "ViPER4Android"
|
||||
|
||||
static effect_descriptor_t viper_descriptor = {
|
||||
// Identical type/uuid to original ViPER4Android
|
||||
.type = {0x00000000, 0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
|
||||
.uuid = {0x41d3c987, 0xe6cf, 0x11e3, 0xa88a, {0x11, 0xab, 0xa5, 0xd5, 0xc5, 0x1b}},
|
||||
.type = EFFECT_UUID_INITIALIZER,
|
||||
.uuid = {0x90380da3, 0x8536, 0x4744, 0xa6a3, {0x57, 0x31, 0x97, 0x0e, 0x64, 0x0f}},
|
||||
.apiVersion = EFFECT_CONTROL_API_VERSION,
|
||||
.flags = EFFECT_FLAG_OUTPUT_BOTH | EFFECT_FLAG_INPUT_BOTH | EFFECT_FLAG_INSERT_LAST | EFFECT_FLAG_TYPE_INSERT,
|
||||
.flags = EFFECT_FLAG_OUTPUT_DIRECT | EFFECT_FLAG_INPUT_DIRECT | EFFECT_FLAG_INSERT_LAST | EFFECT_FLAG_TYPE_INSERT,
|
||||
.cpuLoad = 8, // In 0.1 MIPS units as estimated on an ARM9E core (ARMv5TE) with 0 WS
|
||||
.memoryUsage = 1, // In KB and includes only dynamically allocated memory
|
||||
.name = VIPER_EFFECT_NAME,
|
||||
@ -218,8 +217,20 @@ static int32_t Viper_ICommand(effect_handle_t self,
|
||||
struct timeval time{};
|
||||
gettimeofday(&time, nullptr);
|
||||
|
||||
// TODO: Do some calculations
|
||||
uint64_t currentMs = (time.tv_sec * 1000) + (time.tv_usec / 1000);
|
||||
uint64_t lastProcessTime = pContext->viper->process_time_ms;
|
||||
|
||||
uint64_t diff;
|
||||
if (currentMs > lastProcessTime) {
|
||||
diff = currentMs - lastProcessTime;
|
||||
} else {
|
||||
diff = lastProcessTime - currentMs;
|
||||
}
|
||||
|
||||
pReplyParam->status = 0;
|
||||
pReplyParam->vsize = sizeof(int32_t);
|
||||
*(int32_t *) (pReplyParam->data + vOffset) = diff > 5000 ? 0 : 1;
|
||||
*replySize = sizeof(effect_param_t) + pReplyParam->psize + vOffset + pReplyParam->vsize;
|
||||
return 0;
|
||||
}
|
||||
case PARAM_GET_SAMPLINGRATE: {
|
||||
|
@ -10,20 +10,17 @@ enum ParamsMode {
|
||||
};
|
||||
|
||||
enum ParamsGet {
|
||||
PARAM_GET_STATUS_BEGIN = 0x08000,
|
||||
PARAM_GET_DRIVER_VERSION,
|
||||
PARAM_GET_ENABLED,
|
||||
PARAM_GET_CONFIGURE,
|
||||
PARAM_GET_DRVCANWORK,
|
||||
PARAM_GET_STREAMING,
|
||||
PARAM_GET_SAMPLINGRATE,
|
||||
PARAM_GET_CONVUSABLE,
|
||||
PARAM_GET_CONVKNLID,
|
||||
PARAM_GET_STATUS_END
|
||||
PARAM_GET_CONVKNLID
|
||||
};
|
||||
|
||||
enum ParamsSet {
|
||||
PARAM_SET_STATUS_BEGIN = 0x09000,
|
||||
PARAM_SET_STATUS_BEGIN = 0x9000,
|
||||
PARAM_SET_UNKNOWN,
|
||||
PARAM_SET_UPDATE_STATUS,
|
||||
PARAM_SET_RESET_STATUS,
|
||||
@ -36,115 +33,115 @@ enum ParamsSet {
|
||||
enum ParamsConfigure {
|
||||
PARAM_PROCESSUNIT_FX_BEGIN = 0x10000,
|
||||
|
||||
PARAM_FX_TYPE_SWITCH,
|
||||
PARAM_HPFX_CONV_PROCESS_ENABLED,
|
||||
PARAM_HPFX_CONV_UPDATEKERNEL,
|
||||
PARAM_FX_TYPE_SWITCH, // 0x10001
|
||||
PARAM_HPFX_CONV_PROCESS_ENABLED, // 0x10002
|
||||
PARAM_HPFX_CONV_UPDATEKERNEL, // 0x10003
|
||||
/*****************************************/
|
||||
// Please use PARAM_HPFX_CONV_UPDATEKERNEL instead
|
||||
PARAM_HPFX_CONV_PREPAREBUFFER,
|
||||
PARAM_HPFX_CONV_SETBUFFER,
|
||||
PARAM_HPFX_CONV_COMMITBUFFER,
|
||||
PARAM_HPFX_CONV_PREPAREBUFFER, // 0x10004
|
||||
PARAM_HPFX_CONV_SETBUFFER, // 0x10005
|
||||
PARAM_HPFX_CONV_COMMITBUFFER, // 0x10006
|
||||
/*****************************************/
|
||||
PARAM_HPFX_CONV_CROSSCHANNEL,
|
||||
PARAM_HPFX_VHE_PROCESS_ENABLED,
|
||||
PARAM_HPFX_VHE_EFFECT_LEVEL,
|
||||
PARAM_HPFX_VDDC_PROCESS_ENABLED,
|
||||
PARAM_HPFX_VDDC_COEFFS,
|
||||
PARAM_HPFX_VSE_PROCESS_ENABLED,
|
||||
PARAM_HPFX_VSE_REFERENCE_BARK,
|
||||
PARAM_HPFX_VSE_BARK_RECONSTRUCT,
|
||||
PARAM_HPFX_FIREQ_PROCESS_ENABLED,
|
||||
PARAM_HPFX_FIREQ_BANDLEVEL,
|
||||
PARAM_HPFX_COLM_PROCESS_ENABLED,
|
||||
PARAM_HPFX_COLM_WIDENING,
|
||||
PARAM_HPFX_COLM_MIDIMAGE,
|
||||
PARAM_HPFX_COLM_DEPTH,
|
||||
PARAM_HPFX_DIFFSURR_PROCESS_ENABLED,
|
||||
PARAM_HPFX_DIFFSURR_DELAYTIME,
|
||||
PARAM_HPFX_REVB_PROCESS_ENABLED,
|
||||
PARAM_HPFX_REVB_ROOMSIZE,
|
||||
PARAM_HPFX_REVB_WIDTH,
|
||||
PARAM_HPFX_REVB_DAMP,
|
||||
PARAM_HPFX_REVB_WET,
|
||||
PARAM_HPFX_REVB_DRY,
|
||||
PARAM_HPFX_AGC_PROCESS_ENABLED,
|
||||
PARAM_HPFX_AGC_RATIO,
|
||||
PARAM_HPFX_AGC_VOLUME,
|
||||
PARAM_HPFX_AGC_MAXSCALER,
|
||||
PARAM_HPFX_DYNSYS_PROCESS_ENABLED,
|
||||
PARAM_HPFX_DYNSYS_XCOEFFS,
|
||||
PARAM_HPFX_DYNSYS_YCOEFFS,
|
||||
PARAM_HPFX_DYNSYS_SIDEGAIN,
|
||||
PARAM_HPFX_DYNSYS_BASSGAIN,
|
||||
PARAM_HPFX_VIPERBASS_PROCESS_ENABLED,
|
||||
PARAM_HPFX_VIPERBASS_MODE,
|
||||
PARAM_HPFX_VIPERBASS_SPEAKER,
|
||||
PARAM_HPFX_VIPERBASS_BASSGAIN,
|
||||
PARAM_HPFX_VIPERCLARITY_PROCESS_ENABLED,
|
||||
PARAM_HPFX_VIPERCLARITY_MODE,
|
||||
PARAM_HPFX_VIPERCLARITY_CLARITY,
|
||||
PARAM_HPFX_CURE_PROCESS_ENABLED,
|
||||
PARAM_HPFX_CURE_CROSSFEED,
|
||||
PARAM_HPFX_TUBE_PROCESS_ENABLED,
|
||||
PARAM_HPFX_ANALOGX_PROCESS_ENABLED,
|
||||
PARAM_HPFX_ANALOGX_MODE,
|
||||
PARAM_HPFX_OUTPUT_VOLUME,
|
||||
PARAM_HPFX_OUTPUT_PAN,
|
||||
PARAM_HPFX_LIMITER_THRESHOLD,
|
||||
PARAM_SPKFX_CONV_PROCESS_ENABLED,
|
||||
PARAM_SPKFX_CONV_UPDATEKERNEL,
|
||||
PARAM_SPKFX_CONV_PREPAREBUFFER,
|
||||
PARAM_SPKFX_CONV_SETBUFFER,
|
||||
PARAM_SPKFX_CONV_COMMITBUFFER,
|
||||
PARAM_SPKFX_CONV_CROSSCHANNEL,
|
||||
PARAM_SPKFX_FIREQ_PROCESS_ENABLED,
|
||||
PARAM_SPKFX_FIREQ_BANDLEVEL,
|
||||
PARAM_SPKFX_REVB_PROCESS_ENABLED,
|
||||
PARAM_SPKFX_REVB_ROOMSIZE,
|
||||
PARAM_SPKFX_REVB_WIDTH,
|
||||
PARAM_SPKFX_REVB_DAMP,
|
||||
PARAM_SPKFX_REVB_WET,
|
||||
PARAM_SPKFX_REVB_DRY,
|
||||
PARAM_SPKFX_AGC_PROCESS_ENABLED,
|
||||
PARAM_SPKFX_AGC_RATIO,
|
||||
PARAM_SPKFX_AGC_VOLUME,
|
||||
PARAM_SPKFX_AGC_MAXSCALER,
|
||||
PARAM_SPKFX_OUTPUT_VOLUME,
|
||||
PARAM_SPKFX_LIMITER_THRESHOLD,
|
||||
PARAM_HPFX_FETCOMP_PROCESS_ENABLED,
|
||||
PARAM_HPFX_FETCOMP_THRESHOLD,
|
||||
PARAM_HPFX_FETCOMP_RATIO,
|
||||
PARAM_HPFX_FETCOMP_KNEEWIDTH,
|
||||
PARAM_HPFX_FETCOMP_AUTOKNEE_ENABLED,
|
||||
PARAM_HPFX_FETCOMP_GAIN,
|
||||
PARAM_HPFX_FETCOMP_AUTOGAIN_ENABLED,
|
||||
PARAM_HPFX_FETCOMP_ATTACK,
|
||||
PARAM_HPFX_FETCOMP_AUTOATTACK_ENABLED,
|
||||
PARAM_HPFX_FETCOMP_RELEASE,
|
||||
PARAM_HPFX_FETCOMP_AUTORELEASE_ENABLED,
|
||||
PARAM_HPFX_FETCOMP_META_KNEEMULTI,
|
||||
PARAM_HPFX_FETCOMP_META_MAXATTACK,
|
||||
PARAM_HPFX_FETCOMP_META_MAXRELEASE,
|
||||
PARAM_HPFX_FETCOMP_META_CREST,
|
||||
PARAM_HPFX_FETCOMP_META_ADAPT,
|
||||
PARAM_HPFX_FETCOMP_META_NOCLIP_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_PROCESS_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_THRESHOLD,
|
||||
PARAM_SPKFX_FETCOMP_RATIO,
|
||||
PARAM_SPKFX_FETCOMP_KNEEWIDTH,
|
||||
PARAM_SPKFX_FETCOMP_AUTOKNEE_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_GAIN,
|
||||
PARAM_SPKFX_FETCOMP_AUTOGAIN_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_ATTACK,
|
||||
PARAM_SPKFX_FETCOMP_AUTOATTACK_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_RELEASE,
|
||||
PARAM_SPKFX_FETCOMP_AUTORELEASE_ENABLED,
|
||||
PARAM_SPKFX_FETCOMP_META_KNEEMULTI,
|
||||
PARAM_SPKFX_FETCOMP_META_MAXATTACK,
|
||||
PARAM_SPKFX_FETCOMP_META_MAXRELEASE,
|
||||
PARAM_SPKFX_FETCOMP_META_CREST,
|
||||
PARAM_SPKFX_FETCOMP_META_ADAPT,
|
||||
PARAM_SPKFX_FETCOMP_META_NOCLIP_ENABLED,
|
||||
PARAM_HPFX_CONV_CROSSCHANNEL, // 0x10007
|
||||
PARAM_HPFX_VHE_PROCESS_ENABLED, // 0x10008
|
||||
PARAM_HPFX_VHE_EFFECT_LEVEL, // 0x10009
|
||||
PARAM_HPFX_VDDC_PROCESS_ENABLED, // 0x1000A
|
||||
PARAM_HPFX_VDDC_COEFFS, // 0x1000B
|
||||
PARAM_HPFX_VSE_PROCESS_ENABLED, // 0x1000C
|
||||
PARAM_HPFX_VSE_REFERENCE_BARK, // 0x1000D
|
||||
PARAM_HPFX_VSE_BARK_RECONSTRUCT, // 0x1000E
|
||||
PARAM_HPFX_FIREQ_PROCESS_ENABLED, // 0x1000F
|
||||
PARAM_HPFX_FIREQ_BANDLEVEL, // 0x10010
|
||||
PARAM_HPFX_COLM_PROCESS_ENABLED, // 0x10011
|
||||
PARAM_HPFX_COLM_WIDENING, // 0x10012
|
||||
PARAM_HPFX_COLM_MIDIMAGE, // 0x10013
|
||||
PARAM_HPFX_COLM_DEPTH, // 0x10014
|
||||
PARAM_HPFX_DIFFSURR_PROCESS_ENABLED, // 0x10015
|
||||
PARAM_HPFX_DIFFSURR_DELAYTIME, // 0x10016
|
||||
PARAM_HPFX_REVB_PROCESS_ENABLED, // 0x10017
|
||||
PARAM_HPFX_REVB_ROOMSIZE, // 0x10018
|
||||
PARAM_HPFX_REVB_WIDTH, // 0x10019
|
||||
PARAM_HPFX_REVB_DAMP, // 0x1001A
|
||||
PARAM_HPFX_REVB_WET, // 0x1001B
|
||||
PARAM_HPFX_REVB_DRY, // 0x1001C
|
||||
PARAM_HPFX_AGC_PROCESS_ENABLED, // 0x1001D
|
||||
PARAM_HPFX_AGC_RATIO, // 0x1001E
|
||||
PARAM_HPFX_AGC_VOLUME, // 0x1001F
|
||||
PARAM_HPFX_AGC_MAXSCALER, // 0x10020
|
||||
PARAM_HPFX_DYNSYS_PROCESS_ENABLED, // 0x10021
|
||||
PARAM_HPFX_DYNSYS_XCOEFFS, // 0x10022
|
||||
PARAM_HPFX_DYNSYS_YCOEFFS, // 0x10023
|
||||
PARAM_HPFX_DYNSYS_SIDEGAIN, // 0x10024
|
||||
PARAM_HPFX_DYNSYS_BASSGAIN, // 0x10025
|
||||
PARAM_HPFX_VIPERBASS_PROCESS_ENABLED, // 0x10026
|
||||
PARAM_HPFX_VIPERBASS_MODE, // 0x10027
|
||||
PARAM_HPFX_VIPERBASS_SPEAKER, // 0x10028
|
||||
PARAM_HPFX_VIPERBASS_BASSGAIN, // 0x10029
|
||||
PARAM_HPFX_VIPERCLARITY_PROCESS_ENABLED, // 0x1002A
|
||||
PARAM_HPFX_VIPERCLARITY_MODE, // 0x1002B
|
||||
PARAM_HPFX_VIPERCLARITY_CLARITY, // 0x1002C
|
||||
PARAM_HPFX_CURE_PROCESS_ENABLED, // 0x1002D
|
||||
PARAM_HPFX_CURE_CROSSFEED, // 0x1002E
|
||||
PARAM_HPFX_TUBE_PROCESS_ENABLED, // 0x1002F
|
||||
PARAM_HPFX_ANALOGX_PROCESS_ENABLED, // 0x10030
|
||||
PARAM_HPFX_ANALOGX_MODE, // 0x10031
|
||||
PARAM_HPFX_OUTPUT_VOLUME, // 0x10032
|
||||
PARAM_HPFX_OUTPUT_PAN, // 0x10033
|
||||
PARAM_HPFX_LIMITER_THRESHOLD, // 0x10034
|
||||
PARAM_SPKFX_CONV_PROCESS_ENABLED, // 0x10035
|
||||
PARAM_SPKFX_CONV_UPDATEKERNEL, // 0x10036
|
||||
PARAM_SPKFX_CONV_PREPAREBUFFER, // 0x10037
|
||||
PARAM_SPKFX_CONV_SETBUFFER, // 0x10038
|
||||
PARAM_SPKFX_CONV_COMMITBUFFER, // 0x10039
|
||||
PARAM_SPKFX_CONV_CROSSCHANNEL, // 0x1003A
|
||||
PARAM_SPKFX_FIREQ_PROCESS_ENABLED, // 0x1003B
|
||||
PARAM_SPKFX_FIREQ_BANDLEVEL, // 0x1003C
|
||||
PARAM_SPKFX_REVB_PROCESS_ENABLED, // 0x1003D
|
||||
PARAM_SPKFX_REVB_ROOMSIZE, // 0x1003E
|
||||
PARAM_SPKFX_REVB_WIDTH, // 0x1003F
|
||||
PARAM_SPKFX_REVB_DAMP, // 0x10040
|
||||
PARAM_SPKFX_REVB_WET, // 0x10041
|
||||
PARAM_SPKFX_REVB_DRY, // 0x10042
|
||||
PARAM_SPKFX_AGC_PROCESS_ENABLED, // 0x10043
|
||||
PARAM_SPKFX_AGC_RATIO, // 0x10044
|
||||
PARAM_SPKFX_AGC_VOLUME, // 0x10045
|
||||
PARAM_SPKFX_AGC_MAXSCALER, // 0x10046
|
||||
PARAM_SPKFX_OUTPUT_VOLUME, // 0x10047
|
||||
PARAM_SPKFX_LIMITER_THRESHOLD, // 0x10048
|
||||
PARAM_HPFX_FETCOMP_PROCESS_ENABLED, // 0x10049
|
||||
PARAM_HPFX_FETCOMP_THRESHOLD, // 0x1004A
|
||||
PARAM_HPFX_FETCOMP_RATIO, // 0x1004B
|
||||
PARAM_HPFX_FETCOMP_KNEEWIDTH, // 0x1004C
|
||||
PARAM_HPFX_FETCOMP_AUTOKNEE_ENABLED, // 0x1004D
|
||||
PARAM_HPFX_FETCOMP_GAIN, // 0x1004E
|
||||
PARAM_HPFX_FETCOMP_AUTOGAIN_ENABLED, // 0x1004F
|
||||
PARAM_HPFX_FETCOMP_ATTACK, // 0x10050
|
||||
PARAM_HPFX_FETCOMP_AUTOATTACK_ENABLED, // 0x10051
|
||||
PARAM_HPFX_FETCOMP_RELEASE, // 0x10052
|
||||
PARAM_HPFX_FETCOMP_AUTORELEASE_ENABLED, // 0x10053
|
||||
PARAM_HPFX_FETCOMP_META_KNEEMULTI, // 0x10054
|
||||
PARAM_HPFX_FETCOMP_META_MAXATTACK, // 0x10055
|
||||
PARAM_HPFX_FETCOMP_META_MAXRELEASE, // 0x10056
|
||||
PARAM_HPFX_FETCOMP_META_CREST, // 0x10057
|
||||
PARAM_HPFX_FETCOMP_META_ADAPT, // 0x10058
|
||||
PARAM_HPFX_FETCOMP_META_NOCLIP_ENABLED, // 0x10059
|
||||
PARAM_SPKFX_FETCOMP_PROCESS_ENABLED, // 0x1005A
|
||||
PARAM_SPKFX_FETCOMP_THRESHOLD, // 0x1005B
|
||||
PARAM_SPKFX_FETCOMP_RATIO, // 0x1005C
|
||||
PARAM_SPKFX_FETCOMP_KNEEWIDTH, // 0x1005D
|
||||
PARAM_SPKFX_FETCOMP_AUTOKNEE_ENABLED, // 0x1005E
|
||||
PARAM_SPKFX_FETCOMP_GAIN, // 0x1005F
|
||||
PARAM_SPKFX_FETCOMP_AUTOGAIN_ENABLED, // 0x10060
|
||||
PARAM_SPKFX_FETCOMP_ATTACK, // 0x10061
|
||||
PARAM_SPKFX_FETCOMP_AUTOATTACK_ENABLED, // 0x10062
|
||||
PARAM_SPKFX_FETCOMP_RELEASE, // 0x10063
|
||||
PARAM_SPKFX_FETCOMP_AUTORELEASE_ENABLED, // 0x10064
|
||||
PARAM_SPKFX_FETCOMP_META_KNEEMULTI, // 0x10065
|
||||
PARAM_SPKFX_FETCOMP_META_MAXATTACK, // 0x10066
|
||||
PARAM_SPKFX_FETCOMP_META_MAXRELEASE, // 0x10067
|
||||
PARAM_SPKFX_FETCOMP_META_CREST, // 0x10068
|
||||
PARAM_SPKFX_FETCOMP_META_ADAPT, // 0x10069
|
||||
PARAM_SPKFX_FETCOMP_META_NOCLIP_ENABLED, // 0x1006A
|
||||
|
||||
PARAM_PROCESSUNIT_FX_END
|
||||
};
|
||||
|
@ -206,7 +206,423 @@ void ViPER::processBuffer(float *buffer, uint32_t size) {
|
||||
|
||||
void ViPER::DispatchCommand(int param, int val1, int val2, int val3, int val4, uint32_t arrSize,
|
||||
signed char *arr) {
|
||||
// TODO
|
||||
switch (param) {
|
||||
case PARAM_SET_UNKNOWN: {
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_UPDATE_STATUS: {
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_RESET_STATUS: {
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_DOPROCESS_STATUS: {
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_FORCEENABLE_STATUS: {
|
||||
break;
|
||||
}
|
||||
case PARAM_SET_SELFDIAGNOSE_STATUS: {
|
||||
break;
|
||||
}
|
||||
case PARAM_FX_TYPE_SWITCH: {
|
||||
// Unused
|
||||
// TODO: Remove
|
||||
break;
|
||||
} // 0x10001
|
||||
case PARAM_HPFX_CONV_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x10002
|
||||
case PARAM_HPFX_CONV_UPDATEKERNEL: {
|
||||
break;
|
||||
} // 0x10003
|
||||
case PARAM_HPFX_CONV_PREPAREBUFFER: {
|
||||
this->convolver->PrepareKernelBuffer(val1, val2, val3);
|
||||
break;
|
||||
} // 0x10004
|
||||
case PARAM_HPFX_CONV_SETBUFFER: {
|
||||
break;
|
||||
} // 0x10005
|
||||
case PARAM_HPFX_CONV_COMMITBUFFER: {
|
||||
this->convolver->CommitKernelBuffer(val1, val2, val3);
|
||||
break;
|
||||
} // 0x10006
|
||||
case PARAM_HPFX_CONV_CROSSCHANNEL: {
|
||||
break;
|
||||
} // 0x10007
|
||||
case PARAM_HPFX_VHE_PROCESS_ENABLED: {
|
||||
this->vhe->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x10008
|
||||
case PARAM_HPFX_VHE_EFFECT_LEVEL: {
|
||||
this->vhe->SetEffectLevel(val1);
|
||||
break;
|
||||
} // 0x10009
|
||||
case PARAM_HPFX_VDDC_PROCESS_ENABLED: {
|
||||
this->viperDdc->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1000A
|
||||
case PARAM_HPFX_VDDC_COEFFS: {
|
||||
// TODO: Finish
|
||||
//this->viperDdc->SetCoeffs();
|
||||
break;
|
||||
} // 0x1000B
|
||||
case PARAM_HPFX_VSE_PROCESS_ENABLED: {
|
||||
this->spectrumExtend->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1000C
|
||||
case PARAM_HPFX_VSE_REFERENCE_BARK: {
|
||||
this->spectrumExtend->SetReferenceFrequency(val1);
|
||||
break;
|
||||
} // 0x1000D
|
||||
case PARAM_HPFX_VSE_BARK_RECONSTRUCT: {
|
||||
this->spectrumExtend->SetExciter((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1000E
|
||||
case PARAM_HPFX_FIREQ_PROCESS_ENABLED: {
|
||||
this->iirFilter->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1000F
|
||||
case PARAM_HPFX_FIREQ_BANDLEVEL: {
|
||||
this->iirFilter->SetBandLevel(val1, (float) val2 / 100.0f);
|
||||
break;
|
||||
} // 0x10010
|
||||
case PARAM_HPFX_COLM_PROCESS_ENABLED: {
|
||||
this->colorfulMusic->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x10011
|
||||
case PARAM_HPFX_COLM_WIDENING: {
|
||||
this->colorfulMusic->SetWidenValue((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10012
|
||||
case PARAM_HPFX_COLM_MIDIMAGE: {
|
||||
this->colorfulMusic->SetMidImageValue((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10013
|
||||
case PARAM_HPFX_COLM_DEPTH: {
|
||||
this->colorfulMusic->SetDepthValue((short) val1);
|
||||
break;
|
||||
} // 0x10014
|
||||
case PARAM_HPFX_DIFFSURR_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x10015
|
||||
case PARAM_HPFX_DIFFSURR_DELAYTIME: {
|
||||
this->diffSurround->SetDelayTime((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10016
|
||||
case PARAM_HPFX_REVB_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x10017
|
||||
case PARAM_HPFX_REVB_ROOMSIZE: {
|
||||
break;
|
||||
} // 0x10018
|
||||
case PARAM_HPFX_REVB_WIDTH: {
|
||||
this->reverberation->SetWidth((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10019
|
||||
case PARAM_HPFX_REVB_DAMP: {
|
||||
break;
|
||||
} // 0x1001A
|
||||
case PARAM_HPFX_REVB_WET: {
|
||||
break;
|
||||
} // 0x1001B
|
||||
case PARAM_HPFX_REVB_DRY: {
|
||||
break;
|
||||
} // 0x1001C
|
||||
case PARAM_HPFX_AGC_PROCESS_ENABLED: {
|
||||
this->playbackGain->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1001D
|
||||
case PARAM_HPFX_AGC_RATIO: {
|
||||
this->playbackGain->SetRatio((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1001E
|
||||
case PARAM_HPFX_AGC_VOLUME: {
|
||||
this->playbackGain->SetVolume((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1001F
|
||||
case PARAM_HPFX_AGC_MAXSCALER: {
|
||||
this->playbackGain->SetMaxGainFactor((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10020
|
||||
case PARAM_HPFX_DYNSYS_PROCESS_ENABLED: {
|
||||
this->dynamicSystem->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x10021
|
||||
case PARAM_HPFX_DYNSYS_XCOEFFS: {
|
||||
this->dynamicSystem->SetXCoeffs(val1, val2);
|
||||
break;
|
||||
} // 0x10022
|
||||
case PARAM_HPFX_DYNSYS_YCOEFFS: {
|
||||
this->dynamicSystem->SetYCoeffs(val1, val2);
|
||||
break;
|
||||
} // 0x10023
|
||||
case PARAM_HPFX_DYNSYS_SIDEGAIN: {
|
||||
this->dynamicSystem->SetSideGain((float) val1 / 100.0f, (float) val2 / 100.0f);
|
||||
break;
|
||||
} // 0x10024
|
||||
case PARAM_HPFX_DYNSYS_BASSGAIN: {
|
||||
this->dynamicSystem->SetBassGain((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10025
|
||||
case PARAM_HPFX_VIPERBASS_PROCESS_ENABLED: {
|
||||
// this->viperBass->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x10026
|
||||
case PARAM_HPFX_VIPERBASS_MODE: {
|
||||
this->viperBass->SetProcessMode(static_cast<ViPERBass::ProcessMode>(val1));
|
||||
break;
|
||||
} // 0x10027
|
||||
case PARAM_HPFX_VIPERBASS_SPEAKER: {
|
||||
this->viperBass->SetSpeaker(val1);
|
||||
break;
|
||||
} // 0x10028
|
||||
case PARAM_HPFX_VIPERBASS_BASSGAIN: {
|
||||
this->viperBass->SetBassFactor((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10029
|
||||
case PARAM_HPFX_VIPERCLARITY_PROCESS_ENABLED: {
|
||||
//this->viperClarity->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1002A
|
||||
case PARAM_HPFX_VIPERCLARITY_MODE: {
|
||||
this->viperClarity->SetProcessMode(static_cast<ViPERClarity::ClarityMode>(val1));
|
||||
break;
|
||||
} // 0x1002B
|
||||
case PARAM_HPFX_VIPERCLARITY_CLARITY: {
|
||||
this->viperClarity->SetClarity((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1002C
|
||||
case PARAM_HPFX_CURE_PROCESS_ENABLED: {
|
||||
this->cure->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1002D
|
||||
case PARAM_HPFX_CURE_CROSSFEED: {
|
||||
switch (val1) {
|
||||
case 0:
|
||||
// Cure_R::SetPreset(pCVar17,0x5f028a);
|
||||
break;
|
||||
case 1:
|
||||
// Cure_R::SetPreset(pCVar17,0x3c02bc);
|
||||
break;
|
||||
case 2:
|
||||
// Cure_R::SetPreset(pCVar17,0x2d02bc);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
} // 0x1002E
|
||||
case PARAM_HPFX_TUBE_PROCESS_ENABLED: {
|
||||
// TODO: Enable
|
||||
break;
|
||||
} // 0x1002F
|
||||
case PARAM_HPFX_ANALOGX_PROCESS_ENABLED: {
|
||||
// TODO: Enable
|
||||
break;
|
||||
} // 0x10030
|
||||
case PARAM_HPFX_ANALOGX_MODE: {
|
||||
this->analogX->SetProcessingModel(val1);
|
||||
break;
|
||||
} // 0x10031
|
||||
case PARAM_HPFX_OUTPUT_VOLUME: {
|
||||
|
||||
break;
|
||||
} // 0x10032
|
||||
case PARAM_HPFX_OUTPUT_PAN: {
|
||||
float tmp = (float) val1 / 100.0f;
|
||||
if (tmp < 0.0f) {
|
||||
this->left_pan = 1.0f;
|
||||
this->right_pan = 1.0f + tmp;
|
||||
} else {
|
||||
this->left_pan = 1.0f - tmp;
|
||||
this->right_pan = 1.0f;
|
||||
}
|
||||
break;
|
||||
} // 0x10033
|
||||
case PARAM_HPFX_LIMITER_THRESHOLD: {
|
||||
this->softwareLimiters[0]->SetGate((float) val1 / 100.0f);
|
||||
this->softwareLimiters[1]->SetGate((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10034
|
||||
case PARAM_SPKFX_CONV_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x10035
|
||||
case PARAM_SPKFX_CONV_UPDATEKERNEL: {
|
||||
break;
|
||||
} // 0x10036
|
||||
case PARAM_SPKFX_CONV_PREPAREBUFFER: {
|
||||
break;
|
||||
} // 0x10037
|
||||
case PARAM_SPKFX_CONV_SETBUFFER: {
|
||||
break;
|
||||
} // 0x10038
|
||||
case PARAM_SPKFX_CONV_COMMITBUFFER: {
|
||||
break;
|
||||
} // 0x10039
|
||||
case PARAM_SPKFX_CONV_CROSSCHANNEL: {
|
||||
this->convolver->SetCrossChannel((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1003A
|
||||
case PARAM_SPKFX_FIREQ_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x1003B
|
||||
case PARAM_SPKFX_FIREQ_BANDLEVEL: {
|
||||
break;
|
||||
} // 0x1003C
|
||||
case PARAM_SPKFX_REVB_PROCESS_ENABLED: {
|
||||
this->reverberation->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x1003D
|
||||
case PARAM_SPKFX_REVB_ROOMSIZE: {
|
||||
this->reverberation->SetRoomSize((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1003E
|
||||
case PARAM_SPKFX_REVB_WIDTH: {
|
||||
break;
|
||||
} // 0x1003F
|
||||
case PARAM_SPKFX_REVB_DAMP: {
|
||||
this->reverberation->SetDamp((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10040
|
||||
case PARAM_SPKFX_REVB_WET: {
|
||||
this->reverberation->SetWet((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10041
|
||||
case PARAM_SPKFX_REVB_DRY: {
|
||||
this->reverberation->SetDry((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10042
|
||||
case PARAM_SPKFX_AGC_PROCESS_ENABLED: {
|
||||
this->speakerCorrection->SetEnable(val1 != 0);
|
||||
break;
|
||||
} // 0x10043
|
||||
case PARAM_SPKFX_AGC_RATIO: {
|
||||
break;
|
||||
} // 0x10044
|
||||
case PARAM_SPKFX_AGC_VOLUME: {
|
||||
this->playbackGain->SetVolume((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10045
|
||||
case PARAM_SPKFX_AGC_MAXSCALER: {
|
||||
this->playbackGain->SetMaxGainFactor((float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10046
|
||||
case PARAM_SPKFX_OUTPUT_VOLUME: {
|
||||
this->frame_scale = (float) val1 / 100.0f;
|
||||
break;
|
||||
} // 0x10047
|
||||
case PARAM_SPKFX_LIMITER_THRESHOLD: {
|
||||
this->frame_scale = (float) val1 / 100.0f;
|
||||
break;
|
||||
} // 0x10048
|
||||
case PARAM_HPFX_FETCOMP_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x10049
|
||||
case PARAM_HPFX_FETCOMP_THRESHOLD: {
|
||||
break;
|
||||
} // 0x1004A
|
||||
case PARAM_HPFX_FETCOMP_RATIO: {
|
||||
this->fetCompressor->SetParameter(1, (float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1004B
|
||||
case PARAM_HPFX_FETCOMP_KNEEWIDTH: {
|
||||
break;
|
||||
} // 0x1004C
|
||||
case PARAM_HPFX_FETCOMP_AUTOKNEE_ENABLED: {
|
||||
break;
|
||||
} // 0x1004D
|
||||
case PARAM_HPFX_FETCOMP_GAIN: {
|
||||
break;
|
||||
} // 0x1004E
|
||||
case PARAM_HPFX_FETCOMP_AUTOGAIN_ENABLED: {
|
||||
this->fetCompressor->SetParameter(5, (float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1004F
|
||||
case PARAM_HPFX_FETCOMP_ATTACK: {
|
||||
break;
|
||||
} // 0x10050
|
||||
case PARAM_HPFX_FETCOMP_AUTOATTACK_ENABLED: {
|
||||
break;
|
||||
} // 0x10051
|
||||
case PARAM_HPFX_FETCOMP_RELEASE: {
|
||||
break;
|
||||
} // 0x10052
|
||||
case PARAM_HPFX_FETCOMP_AUTORELEASE_ENABLED: {
|
||||
break;
|
||||
} // 0x10053
|
||||
case PARAM_HPFX_FETCOMP_META_KNEEMULTI: {
|
||||
break;
|
||||
} // 0x10054
|
||||
case PARAM_HPFX_FETCOMP_META_MAXATTACK: {
|
||||
break;
|
||||
} // 0x10055
|
||||
case PARAM_HPFX_FETCOMP_META_MAXRELEASE: {
|
||||
this->fetCompressor->SetParameter(12, (float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10056
|
||||
case PARAM_HPFX_FETCOMP_META_CREST: {
|
||||
break;
|
||||
} // 0x10057
|
||||
case PARAM_HPFX_FETCOMP_META_ADAPT: {
|
||||
break;
|
||||
} // 0x10058
|
||||
case PARAM_HPFX_FETCOMP_META_NOCLIP_ENABLED: {
|
||||
this->fetCompressor->SetParameter(15, (float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x10059
|
||||
case PARAM_SPKFX_FETCOMP_PROCESS_ENABLED: {
|
||||
break;
|
||||
} // 0x1005A
|
||||
case PARAM_SPKFX_FETCOMP_THRESHOLD: {
|
||||
|
||||
break;
|
||||
} // 0x1005B
|
||||
case PARAM_SPKFX_FETCOMP_RATIO: {
|
||||
break;
|
||||
} // 0x1005C
|
||||
case PARAM_SPKFX_FETCOMP_KNEEWIDTH: {
|
||||
this->fetCompressor->SetParameter(2, (float) val1 / 100.0f);
|
||||
break;
|
||||
} // 0x1005D
|
||||
case PARAM_SPKFX_FETCOMP_AUTOKNEE_ENABLED: {
|
||||
break;
|
||||
} // 0x1005E
|
||||
case PARAM_SPKFX_FETCOMP_GAIN: {
|
||||
break;
|
||||
} // 0x1005F
|
||||
case PARAM_SPKFX_FETCOMP_AUTOGAIN_ENABLED: {
|
||||
break;
|
||||
} // 0x10060
|
||||
case PARAM_SPKFX_FETCOMP_ATTACK: {
|
||||
break;
|
||||
} // 0x10061
|
||||
case PARAM_SPKFX_FETCOMP_AUTOATTACK_ENABLED: {
|
||||
break;
|
||||
} // 0x10062
|
||||
case PARAM_SPKFX_FETCOMP_RELEASE: {
|
||||
break;
|
||||
} // 0x10063
|
||||
case PARAM_SPKFX_FETCOMP_AUTORELEASE_ENABLED: {
|
||||
break;
|
||||
} // 0x10064
|
||||
case PARAM_SPKFX_FETCOMP_META_KNEEMULTI: {
|
||||
break;
|
||||
} // 0x10065
|
||||
case PARAM_SPKFX_FETCOMP_META_MAXATTACK: {
|
||||
break;
|
||||
} // 0x10066
|
||||
case PARAM_SPKFX_FETCOMP_META_MAXRELEASE: {
|
||||
break;
|
||||
} // 0x10067
|
||||
case PARAM_SPKFX_FETCOMP_META_CREST: {
|
||||
break;
|
||||
} // 0x10068
|
||||
case PARAM_SPKFX_FETCOMP_META_ADAPT: {
|
||||
break;
|
||||
} // 0x10069
|
||||
case PARAM_SPKFX_FETCOMP_META_NOCLIP_ENABLED: {
|
||||
break;
|
||||
} // 0x1006A
|
||||
}
|
||||
}
|
||||
|
||||
void ViPER::ResetAllEffects() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user