compile clean

This commit is contained in:
2025-10-25 15:19:28 +02:00
parent f4e27be46c
commit 80cd25250b
6 changed files with 25 additions and 60 deletions
+1
View File
@@ -0,0 +1 @@
build/
+3 -3
View File
@@ -1,7 +1,7 @@
include ../make/defaults.mk
NAME := Vitalisierer
NAME := Filter
CONFIG ?= release
TARGET ?= JayVitalisierer.so
TARGET ?= JayFilter.so
CFLAGS += -fPIC
CXXFLAGS += -fPIC
@@ -14,7 +14,7 @@ INCLUDES += -I $(VST2_SDK_PATH)
DEFINES += -DVST_2_4_EXTENSIONS=0 -DVST_2_3_EXTENSIONS=1
GCC_SRCS := iir.c paramutils.c
CXX_SRCS := VitalisiererMain.cpp Vitalisierer2.cpp
CXX_SRCS := filter.cpp filterMain.cpp
CXX_SRCS += $(VST2_SDK_PATH)/public.sdk/source/vst2.x/audioeffect.cpp
CXX_SRCS += $(VST2_SDK_PATH)/public.sdk/source/vst2.x/audioeffectx.cpp
+12 -9
View File
@@ -1,10 +1,12 @@
/*-----------------------------------------------------------------------------
© 1999, Steinberg Soft und Hardware GmbH, All Rights Reserved
1999, Steinberg Soft und Hardware GmbH, All Rights Reserved
-----------------------------------------------------------------------------*/
#ifdef WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include "iir.h"
#include "filter.hpp"
@@ -17,7 +19,7 @@
#define ALPHA 0.2f
#define BETA (1.0f-ALPHA)
char *pFTypeString[] =
const char * const pFTypeString[8] =
{
"Unknown",
"Lowpass",
@@ -105,7 +107,7 @@ void Filter::setParameter(VstInt32 index, float value)
forder = ParamQuantize(value,1.0f/(MAX_ORDER/2-1));
order = 2*(VstInt32)(1+forder*MAX_ORDER/2);
sprintf(dbgStr, "value = %f, forder = %f, order = %d",value,forder,order);
OutputDebugString(dbgStr);
// OutputDebugString(dbgStr);
IIRCalcFilterCoeff(filterCoeff_L, sampleRate, 0.5f*fg*sampleRate, q*MAX_Q, order, type);
IIRCalcFilterCoeff(filterCoeff_R, sampleRate, 0.5f*fg*sampleRate, q*MAX_Q, order, type);
break;
@@ -129,7 +131,7 @@ void Filter::setParameter(VstInt32 index, float value)
case TESTPARAM:
testParam=ParamQuantize(value,1.0f/3);
sprintf(dbgStr, "Set Param: %f",value);
OutputDebugString(dbgStr);
// OutputDebugString(dbgStr);
break;
}
@@ -169,7 +171,7 @@ float Filter::getParameter(VstInt32 index)
case TESTPARAM:
value = testParam;
sprintf(dbgStr, "Get Param: %f",value);
OutputDebugString(dbgStr);
// OutputDebugString(dbgStr);
break;
}
return value;
@@ -184,13 +186,14 @@ void Filter::getParameterName(VstInt32 index, char *label)
//-----------------------------------------------------------------------------------------
void Filter::getParameterDisplay(VstInt32 index, char *text)
{
switch(index)
{
case TYPE:
strcpy(text,pFTypeString[type]);
strcpy(text, pFTypeString[type]);
break;
case ORDER:
int2string(order, text, kVstMaxParamStrLen);
snprintf(text, kVstMaxParamStrLen, "%d", order);
break;
case FMIN:
float2string(0.5f*f_fmin*sampleRate,text, kVstMaxParamStrLen);
@@ -263,7 +266,7 @@ void Filter::setSampleRate(float sampleRate)
{
this->sampleRate = sampleRate;
sprintf(dbgStr, "Sample Rate = %f",sampleRate);
OutputDebugString(dbgStr);
// OutputDebugString(dbgStr);
}
//-----------------------------------------------------------------------------------------
@@ -271,5 +274,5 @@ void Filter::setBlockSize(VstInt32 blockSize)
{
this->blockSize = blockSize;
sprintf(dbgStr, "Block Size = %d",blockSize);
OutputDebugString(dbgStr);
// OutputDebugString(dbgStr);
}
+6 -28
View File
@@ -1,6 +1,6 @@
/*-----------------------------------------------------------------------------
© 1999, Steinberg Soft und Hardware GmbH, All Rights Reserved
1999, Steinberg Soft und Hardware GmbH, All Rights Reserved
-----------------------------------------------------------------------------*/
#include <stdio.h>
@@ -10,20 +10,7 @@
static AudioEffect *effect = 0;
bool oome = false;
#if MAC
#pragma export on
#endif
// prototype of the export function main
#if BEOS
#define main main_plugin
extern "C" __declspec(dllexport) AEffect *main_plugin (audioMasterCallback audioMaster);
#else
AEffect *main (audioMasterCallback audioMaster);
#endif
AEffect *main (audioMasterCallback audioMaster)
AEffect *VSTPluginMain (audioMasterCallback audioMaster)
{
// get vst version
if (!audioMaster (0, audioMasterVersion, 0, 0, 0, 0))
@@ -40,17 +27,8 @@ AEffect *main (audioMasterCallback audioMaster)
return effect->getAeffect ();
}
#if MAC
#pragma export off
#endif
#if WIN32
#include <windows.h>
void* hInstance;
BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
{
hInstance = hInst;
return 1;
extern "C" __cdecl AEffect* deprecated_main(
audioMasterCallback audioMaster) asm("main");
__cdecl AEffect* deprecated_main(audioMasterCallback audioMaster) {
return VSTPluginMain(audioMaster);
}
#endif
Regular → Executable
-15
View File
@@ -11,18 +11,3 @@ float ParamQuantize(float value, float quantization)
return result;
}
float norm2quant(float minparm, float maxparm, float quant, float x)
{
int y;
float step = (maxparm-minparm);
y = (int)minparm + (int)quant * (int)((0.5 + x*step)/quant);
return (float)y;
}
float quant2norm(float minparm, float maxparm, float y)
{
return (y-minparm)/(maxparm-minparm);
}
Regular → Executable
+3 -5
View File
@@ -1,6 +1,6 @@
/***************************************************************
** paramutils.h
****************************************************************/
/***************************************************************/
/* paramutils.h
/***************************************************************/
#ifndef PARAMUTILS_H
#define PARAMUTILS_H
#if defined(__cplusplus)
@@ -9,8 +9,6 @@ extern "C" {
/***************************************************************/
float ParamQuantize(float value, float quantization);
float norm2quant(float minparm, float maxparm, float quant, float x);
float quant2norm(float minparm, float maxparm, float y);
/***************************************************************/