Merge branch 'master' of https://github.com/LMMS/lmms into StCyr_ArtworkTabs
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: trusty
|
||||
sudo: required
|
||||
matrix:
|
||||
include:
|
||||
- env: TARGET_OS=win32
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo add-apt-repository ppa:kalakris/cmake -y;
|
||||
sudo add-apt-repository ppa:andrewrk/libgroove -y;
|
||||
if [ $QT5 ]; then
|
||||
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y
|
||||
fi
|
||||
sudo apt-get update -qq
|
||||
sudo add-apt-repository ppa:andrewrk/libgroove -y
|
||||
sudo sed -e "s/trusty/precise/" -i \
|
||||
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list
|
||||
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -qq || true
|
||||
|
||||
@@ -5,6 +5,9 @@ PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev
|
||||
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
|
||||
libgig-dev libsoundio-dev"
|
||||
|
||||
# Help with unmet dependencies
|
||||
PACKAGES="$PACKAGES libjack0"
|
||||
|
||||
if [ $QT5 ]; then
|
||||
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo add-apt-repository ppa:tobydox/mingw-x-precise -y
|
||||
sudo add-apt-repository ppa:tobydox/mingw-x-trusty -y
|
||||
sudo apt-get update -qq
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGES="nsis cloog-isl libmpc2 qt4-linguist-tools mingw32
|
||||
PACKAGES="nsis cloog-isl libmpc3 qt4-linguist-tools mingw32
|
||||
mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk
|
||||
mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw
|
||||
mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate
|
||||
|
||||
@@ -5604,6 +5604,10 @@ PM (ФМ) режим означає Фазова Модуляція: Осцил
|
||||
<source>Piano-Roll - no pattern</source>
|
||||
<translation>Нотний редактор - без шаблону</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Quantize</source>
|
||||
<translation>Квантовать</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PianoView</name>
|
||||
@@ -6487,6 +6491,25 @@ Remember to also save your project manually.</source>
|
||||
<translation>Режим каналу</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SubWindow</name>
|
||||
<message>
|
||||
<source>Close</source>
|
||||
<translation>Закрити</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Maximize</source>
|
||||
<translation>Розгорнути</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Minimize</source>
|
||||
<translation>Згорнути</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restore</source>
|
||||
<translation>Відновити</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TabWidget</name>
|
||||
<message>
|
||||
|
||||
@@ -351,6 +351,11 @@ AutomatableSlider::handle:vertical {
|
||||
margin: -4px -12px -2px;
|
||||
}
|
||||
|
||||
/* about dialog */
|
||||
QTabWidget, QTabWidget QWidget {
|
||||
background: #5b6571;
|
||||
}
|
||||
|
||||
/* window that shows up when you add effects */
|
||||
|
||||
EffectSelectDialog QScrollArea {
|
||||
|
||||
@@ -59,6 +59,8 @@ TARGET_LINK_LIBRARIES(gverb_1216 gverb)
|
||||
|
||||
ADD_LIBRARY(blo STATIC util/blo.c)
|
||||
SET_TARGET_PROPERTIES(blo PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}")
|
||||
TARGET_LINK_LIBRARIES(analogue_osc_1416 blo)
|
||||
TARGET_LINK_LIBRARIES(fm_osc_1415 blo)
|
||||
TARGET_LINK_LIBRARIES(hermes_filter_1200 blo)
|
||||
|
||||
ADD_LIBRARY(rms STATIC util/rms.c)
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WINDOWS_DLL_EXPORT_ __declspec(dllexport)
|
||||
int bIsFirstTime = 1;
|
||||
int bIsFirstTime = 1;
|
||||
void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#else
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortAlias(
|
||||
static LADSPA_Handle instantiateAlias(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Alias *plugin_data = (Alias *)malloc(sizeof(Alias));
|
||||
Alias *plugin_data = (Alias *)calloc(1, sizeof(Alias));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -168,7 +168,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -240,12 +239,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (aliasDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)aliasDescriptor->PortDescriptors);
|
||||
free((char **)aliasDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)aliasDescriptor->PortRangeHints);
|
||||
free(aliasDescriptor);
|
||||
}
|
||||
aliasDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -19,12 +19,14 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WINDOWS_DLL_EXPORT_ __declspec(dllexport)
|
||||
int bIsFirstTime = 1;
|
||||
int bIsFirstTime = 1;
|
||||
void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#else
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "allpass_1895.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
@@ -153,18 +155,19 @@ static void activateAllpass_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 56 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
minsize = sample_rate * *plugin_data->max_delay;
|
||||
else if (plugin_data->delay_time)
|
||||
minsize = sample_rate * *plugin_data->delay_time;
|
||||
else
|
||||
minsize = sample_rate; /* 1 second default */
|
||||
|
||||
|
||||
size = 1;
|
||||
while (size < minsize) size <<= 1;
|
||||
|
||||
|
||||
/* calloc sets the buffer to zero. */
|
||||
buffer = calloc(size, sizeof(LADSPA_Data));
|
||||
if (buffer)
|
||||
@@ -184,6 +187,7 @@ static void activateAllpass_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_n(LADSPA_Handle instance) {
|
||||
#line 78 "allpass_1895.xml"
|
||||
Allpass_n *plugin_data = (Allpass_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -218,18 +222,27 @@ static void connectPortAllpass_n(
|
||||
static LADSPA_Handle instantiateAllpass_n(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Allpass_n *plugin_data = (Allpass_n *)malloc(sizeof(Allpass_n));
|
||||
Allpass_n *plugin_data = (Allpass_n *)calloc(1, sizeof(Allpass_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -276,7 +289,8 @@ static void runAllpass_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
@@ -286,7 +300,7 @@ static void runAllpass_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
plugin_data->delay_samples = delay_samples = CALC_DELAY (delay_time);
|
||||
plugin_data->feedback = feedback = calc_feedback (delay_time, decay_time);
|
||||
}
|
||||
|
||||
|
||||
if (delay_time == last_delay_time) {
|
||||
long read_phase = write_phase - (long)delay_samples;
|
||||
LADSPA_Data *readptr = buffer + (read_phase & buffer_mask);
|
||||
@@ -417,7 +431,8 @@ static void runAddingAllpass_n(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
@@ -530,6 +545,7 @@ static void activateAllpass_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 56 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -561,6 +577,7 @@ static void activateAllpass_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_l(LADSPA_Handle instance) {
|
||||
#line 78 "allpass_1895.xml"
|
||||
Allpass_l *plugin_data = (Allpass_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -595,18 +612,27 @@ static void connectPortAllpass_l(
|
||||
static LADSPA_Handle instantiateAllpass_l(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Allpass_l *plugin_data = (Allpass_l *)malloc(sizeof(Allpass_l));
|
||||
Allpass_l *plugin_data = (Allpass_l *)calloc(1, sizeof(Allpass_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -636,6 +662,9 @@ static void runAllpass_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -650,7 +679,10 @@ static void runAllpass_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -729,6 +761,9 @@ static void runAddingAllpass_l(LADSPA_Handle instance, unsigned long sample_coun
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -743,7 +778,10 @@ static void runAddingAllpass_l(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -811,6 +849,7 @@ static void activateAllpass_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 56 "allpass_1895.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -842,6 +881,7 @@ static void activateAllpass_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupAllpass_c(LADSPA_Handle instance) {
|
||||
#line 78 "allpass_1895.xml"
|
||||
Allpass_c *plugin_data = (Allpass_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -876,18 +916,27 @@ static void connectPortAllpass_c(
|
||||
static LADSPA_Handle instantiateAllpass_c(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Allpass_c *plugin_data = (Allpass_c *)malloc(sizeof(Allpass_c));
|
||||
Allpass_c *plugin_data = (Allpass_c *)calloc(1, sizeof(Allpass_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 44 "allpass_1895.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -917,6 +966,9 @@ static void runAllpass_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -931,7 +983,10 @@ static void runAllpass_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -1013,6 +1068,9 @@ static void runAddingAllpass_c(LADSPA_Handle instance, unsigned long sample_coun
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
|
||||
@@ -1027,7 +1085,10 @@ static void runAddingAllpass_c(LADSPA_Handle instance, unsigned long sample_coun
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 82 "allpass_1895.xml"
|
||||
int i;
|
||||
|
||||
ignore(max_delay);
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -1095,7 +1156,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -1346,24 +1406,27 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (allpass_nDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)allpass_nDescriptor->PortDescriptors);
|
||||
free((char **)allpass_nDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)allpass_nDescriptor->PortRangeHints);
|
||||
free(allpass_nDescriptor);
|
||||
}
|
||||
allpass_nDescriptor = NULL;
|
||||
if (allpass_lDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)allpass_lDescriptor->PortDescriptors);
|
||||
free((char **)allpass_lDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)allpass_lDescriptor->PortRangeHints);
|
||||
free(allpass_lDescriptor);
|
||||
}
|
||||
allpass_lDescriptor = NULL;
|
||||
if (allpass_cDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)allpass_cDescriptor->PortDescriptors);
|
||||
free((char **)allpass_cDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)allpass_cDescriptor->PortRangeHints);
|
||||
free(allpass_cDescriptor);
|
||||
}
|
||||
allpass_cDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ static void connectPortAmPitchshift(
|
||||
static LADSPA_Handle instantiateAmPitchshift(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
AmPitchshift *plugin_data = (AmPitchshift *)malloc(sizeof(AmPitchshift));
|
||||
AmPitchshift *plugin_data = (AmPitchshift *)calloc(1, sizeof(AmPitchshift));
|
||||
unsigned int count;
|
||||
LADSPA_Data *delay = NULL;
|
||||
unsigned int delay_mask;
|
||||
@@ -366,7 +366,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -455,12 +454,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (amPitchshiftDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)amPitchshiftDescriptor->PortDescriptors);
|
||||
free((char **)amPitchshiftDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)amPitchshiftDescriptor->PortRangeHints);
|
||||
free(amPitchshiftDescriptor);
|
||||
}
|
||||
amPitchshiftDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ static void connectPortAmp(
|
||||
static LADSPA_Handle instantiateAmp(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Amp *plugin_data = (Amp *)malloc(sizeof(Amp));
|
||||
Amp *plugin_data = (Amp *)calloc(1, sizeof(Amp));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -161,7 +161,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -233,12 +232,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (ampDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)ampDescriptor->PortDescriptors);
|
||||
free((char **)ampDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)ampDescriptor->PortRangeHints);
|
||||
free(ampDescriptor);
|
||||
}
|
||||
ampDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
410
plugins/LadspaEffect/swh/analogue_osc_1416.c
Normal file
410
plugins/LadspaEffect/swh/analogue_osc_1416.c
Normal file
@@ -0,0 +1,410 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "ladspa.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WINDOWS_DLL_EXPORT_ __declspec(dllexport)
|
||||
int bIsFirstTime = 1;
|
||||
void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#else
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "analogue_osc_1416.xml"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "ladspa-util.h"
|
||||
#include "util/blo.h"
|
||||
|
||||
#define ANALOGUEOSC_WAVE 0
|
||||
#define ANALOGUEOSC_FREQ 1
|
||||
#define ANALOGUEOSC_WARM 2
|
||||
#define ANALOGUEOSC_INSTAB 3
|
||||
#define ANALOGUEOSC_OUTPUT 4
|
||||
|
||||
static LADSPA_Descriptor *analogueOscDescriptor = NULL;
|
||||
|
||||
typedef struct {
|
||||
LADSPA_Data *wave;
|
||||
LADSPA_Data *freq;
|
||||
LADSPA_Data *warm;
|
||||
LADSPA_Data *instab;
|
||||
LADSPA_Data *output;
|
||||
float fs;
|
||||
float itm1;
|
||||
blo_h_osc * osc;
|
||||
float otm1;
|
||||
float otm2;
|
||||
unsigned int rnda;
|
||||
unsigned int rndb;
|
||||
blo_h_tables *tables;
|
||||
LADSPA_Data run_adding_gain;
|
||||
} AnalogueOsc;
|
||||
|
||||
_WINDOWS_DLL_EXPORT_
|
||||
const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
|
||||
|
||||
#ifdef WIN32
|
||||
if (bIsFirstTime) {
|
||||
swh_init();
|
||||
bIsFirstTime = 0;
|
||||
}
|
||||
#endif
|
||||
switch (index) {
|
||||
case 0:
|
||||
return analogueOscDescriptor;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void cleanupAnalogueOsc(LADSPA_Handle instance) {
|
||||
#line 37 "analogue_osc_1416.xml"
|
||||
AnalogueOsc *plugin_data = (AnalogueOsc *)instance;
|
||||
blo_h_tables_free(plugin_data->tables);
|
||||
blo_h_free(plugin_data->osc);
|
||||
free(instance);
|
||||
}
|
||||
|
||||
static void connectPortAnalogueOsc(
|
||||
LADSPA_Handle instance,
|
||||
unsigned long port,
|
||||
LADSPA_Data *data) {
|
||||
AnalogueOsc *plugin;
|
||||
|
||||
plugin = (AnalogueOsc *)instance;
|
||||
switch (port) {
|
||||
case ANALOGUEOSC_WAVE:
|
||||
plugin->wave = data;
|
||||
break;
|
||||
case ANALOGUEOSC_FREQ:
|
||||
plugin->freq = data;
|
||||
break;
|
||||
case ANALOGUEOSC_WARM:
|
||||
plugin->warm = data;
|
||||
break;
|
||||
case ANALOGUEOSC_INSTAB:
|
||||
plugin->instab = data;
|
||||
break;
|
||||
case ANALOGUEOSC_OUTPUT:
|
||||
plugin->output = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static LADSPA_Handle instantiateAnalogueOsc(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
AnalogueOsc *plugin_data = (AnalogueOsc *)calloc(1, sizeof(AnalogueOsc));
|
||||
float fs;
|
||||
float itm1;
|
||||
blo_h_osc *osc = NULL;
|
||||
float otm1;
|
||||
float otm2;
|
||||
unsigned int rnda;
|
||||
unsigned int rndb;
|
||||
blo_h_tables *tables = NULL;
|
||||
|
||||
#line 26 "analogue_osc_1416.xml"
|
||||
tables = blo_h_tables_new(512);
|
||||
osc = blo_h_new(tables, BLO_SINE, (float)s_rate);
|
||||
fs = (float)s_rate;
|
||||
itm1 = 0.0f;
|
||||
otm1 = 0.0f;
|
||||
otm2 = 0.0f;
|
||||
rnda = 43437;
|
||||
rndb = 111145;
|
||||
|
||||
plugin_data->fs = fs;
|
||||
plugin_data->itm1 = itm1;
|
||||
plugin_data->osc = osc;
|
||||
plugin_data->otm1 = otm1;
|
||||
plugin_data->otm2 = otm2;
|
||||
plugin_data->rnda = rnda;
|
||||
plugin_data->rndb = rndb;
|
||||
plugin_data->tables = tables;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
}
|
||||
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
#undef RUN_REPLACING
|
||||
|
||||
#define buffer_write(b, v) (b = v)
|
||||
#define RUN_ADDING 0
|
||||
#define RUN_REPLACING 1
|
||||
|
||||
static void runAnalogueOsc(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
AnalogueOsc *plugin_data = (AnalogueOsc *)instance;
|
||||
|
||||
/* Waveform (1=sin, 2=tri, 3=squ, 4=saw) (float value) */
|
||||
const LADSPA_Data wave = *(plugin_data->wave);
|
||||
|
||||
/* Frequency (Hz) (float value) */
|
||||
const LADSPA_Data freq = *(plugin_data->freq);
|
||||
|
||||
/* Warmth (float value) */
|
||||
const LADSPA_Data warm = *(plugin_data->warm);
|
||||
|
||||
/* Instability (float value) */
|
||||
const LADSPA_Data instab = *(plugin_data->instab);
|
||||
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const output = plugin_data->output;
|
||||
float fs = plugin_data->fs;
|
||||
float itm1 = plugin_data->itm1;
|
||||
blo_h_osc * osc = plugin_data->osc;
|
||||
float otm1 = plugin_data->otm1;
|
||||
float otm2 = plugin_data->otm2;
|
||||
unsigned int rnda = plugin_data->rnda;
|
||||
unsigned int rndb = plugin_data->rndb;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
|
||||
#line 42 "analogue_osc_1416.xml"
|
||||
unsigned long pos;
|
||||
LADSPA_Data x, y;
|
||||
const float q = warm - 0.999f;
|
||||
const float leak = 1.0f - warm * 0.02f;
|
||||
const unsigned int max_jump = (unsigned int)f_round(instab * 30000.0f) + 1;
|
||||
|
||||
osc->wave = LIMIT(f_round(wave) - 1, 0, BLO_N_WAVES-1);
|
||||
osc->nyquist = fs * (0.47f - f_clamp(warm, 0.0f, 1.0f) * 0.41f);
|
||||
blo_hd_set_freq(osc, freq);
|
||||
|
||||
tables = tables; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
x = blo_hd_run_cub(osc);
|
||||
rnda += 432577;
|
||||
rnda *= 47;
|
||||
rndb += 7643113;
|
||||
rnda *= 59;
|
||||
osc->ph.all += (((rnda + rndb)/2) % max_jump) - max_jump/2;
|
||||
osc->ph.all &= osc->ph_mask;
|
||||
y = (x - q) / (1.0f - f_exp(-1.2f * (x - q))) +
|
||||
q / (1.0f - f_exp(1.2f * q));
|
||||
/* Catch the case where x ~= q */
|
||||
if (fabs(y) > 1.0f) {
|
||||
y = 0.83333f + q / (1.0f - f_exp(1.2f * q));
|
||||
}
|
||||
otm2 = otm1;
|
||||
otm1 = leak * otm1 + y - itm1;
|
||||
itm1 = y;
|
||||
|
||||
buffer_write(output[pos], (otm1 + otm2) * 0.5f);
|
||||
}
|
||||
|
||||
plugin_data->itm1 = itm1;
|
||||
plugin_data->otm1 = otm1;
|
||||
plugin_data->otm2 = otm2;
|
||||
plugin_data->rnda = rnda;
|
||||
plugin_data->rndb = rndb;
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
#undef RUN_REPLACING
|
||||
|
||||
#define buffer_write(b, v) (b += (v) * run_adding_gain)
|
||||
#define RUN_ADDING 1
|
||||
#define RUN_REPLACING 0
|
||||
|
||||
static void setRunAddingGainAnalogueOsc(LADSPA_Handle instance, LADSPA_Data gain) {
|
||||
((AnalogueOsc *)instance)->run_adding_gain = gain;
|
||||
}
|
||||
|
||||
static void runAddingAnalogueOsc(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
AnalogueOsc *plugin_data = (AnalogueOsc *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Waveform (1=sin, 2=tri, 3=squ, 4=saw) (float value) */
|
||||
const LADSPA_Data wave = *(plugin_data->wave);
|
||||
|
||||
/* Frequency (Hz) (float value) */
|
||||
const LADSPA_Data freq = *(plugin_data->freq);
|
||||
|
||||
/* Warmth (float value) */
|
||||
const LADSPA_Data warm = *(plugin_data->warm);
|
||||
|
||||
/* Instability (float value) */
|
||||
const LADSPA_Data instab = *(plugin_data->instab);
|
||||
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const output = plugin_data->output;
|
||||
float fs = plugin_data->fs;
|
||||
float itm1 = plugin_data->itm1;
|
||||
blo_h_osc * osc = plugin_data->osc;
|
||||
float otm1 = plugin_data->otm1;
|
||||
float otm2 = plugin_data->otm2;
|
||||
unsigned int rnda = plugin_data->rnda;
|
||||
unsigned int rndb = plugin_data->rndb;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
|
||||
#line 42 "analogue_osc_1416.xml"
|
||||
unsigned long pos;
|
||||
LADSPA_Data x, y;
|
||||
const float q = warm - 0.999f;
|
||||
const float leak = 1.0f - warm * 0.02f;
|
||||
const unsigned int max_jump = (unsigned int)f_round(instab * 30000.0f) + 1;
|
||||
|
||||
osc->wave = LIMIT(f_round(wave) - 1, 0, BLO_N_WAVES-1);
|
||||
osc->nyquist = fs * (0.47f - f_clamp(warm, 0.0f, 1.0f) * 0.41f);
|
||||
blo_hd_set_freq(osc, freq);
|
||||
|
||||
tables = tables; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
x = blo_hd_run_cub(osc);
|
||||
rnda += 432577;
|
||||
rnda *= 47;
|
||||
rndb += 7643113;
|
||||
rnda *= 59;
|
||||
osc->ph.all += (((rnda + rndb)/2) % max_jump) - max_jump/2;
|
||||
osc->ph.all &= osc->ph_mask;
|
||||
y = (x - q) / (1.0f - f_exp(-1.2f * (x - q))) +
|
||||
q / (1.0f - f_exp(1.2f * q));
|
||||
/* Catch the case where x ~= q */
|
||||
if (fabs(y) > 1.0f) {
|
||||
y = 0.83333f + q / (1.0f - f_exp(1.2f * q));
|
||||
}
|
||||
otm2 = otm1;
|
||||
otm1 = leak * otm1 + y - itm1;
|
||||
itm1 = y;
|
||||
|
||||
buffer_write(output[pos], (otm1 + otm2) * 0.5f);
|
||||
}
|
||||
|
||||
plugin_data->itm1 = itm1;
|
||||
plugin_data->otm1 = otm1;
|
||||
plugin_data->otm2 = otm2;
|
||||
plugin_data->rnda = rnda;
|
||||
plugin_data->rndb = rndb;
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
LADSPA_PortRangeHint *port_range_hints;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
#endif
|
||||
|
||||
|
||||
analogueOscDescriptor =
|
||||
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
|
||||
|
||||
if (analogueOscDescriptor) {
|
||||
analogueOscDescriptor->UniqueID = 1416;
|
||||
analogueOscDescriptor->Label = "analogueOsc";
|
||||
analogueOscDescriptor->Properties =
|
||||
LADSPA_PROPERTY_HARD_RT_CAPABLE;
|
||||
analogueOscDescriptor->Name =
|
||||
D_("Analogue Oscillator");
|
||||
analogueOscDescriptor->Maker =
|
||||
"Steve Harris <steve@plugin.org.uk>";
|
||||
analogueOscDescriptor->Copyright =
|
||||
"GPL";
|
||||
analogueOscDescriptor->PortCount = 5;
|
||||
|
||||
port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
|
||||
sizeof(LADSPA_PortDescriptor));
|
||||
analogueOscDescriptor->PortDescriptors =
|
||||
(const LADSPA_PortDescriptor *)port_descriptors;
|
||||
|
||||
port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
|
||||
sizeof(LADSPA_PortRangeHint));
|
||||
analogueOscDescriptor->PortRangeHints =
|
||||
(const LADSPA_PortRangeHint *)port_range_hints;
|
||||
|
||||
port_names = (char **)calloc(5, sizeof(char*));
|
||||
analogueOscDescriptor->PortNames =
|
||||
(const char **)port_names;
|
||||
|
||||
/* Parameters for Waveform (1=sin, 2=tri, 3=squ, 4=saw) */
|
||||
port_descriptors[ANALOGUEOSC_WAVE] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
|
||||
port_names[ANALOGUEOSC_WAVE] =
|
||||
D_("Waveform (1=sin, 2=tri, 3=squ, 4=saw)");
|
||||
port_range_hints[ANALOGUEOSC_WAVE].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_DEFAULT_1;
|
||||
port_range_hints[ANALOGUEOSC_WAVE].LowerBound = 1;
|
||||
port_range_hints[ANALOGUEOSC_WAVE].UpperBound = BLO_N_WAVES;
|
||||
|
||||
/* Parameters for Frequency (Hz) */
|
||||
port_descriptors[ANALOGUEOSC_FREQ] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
|
||||
port_names[ANALOGUEOSC_FREQ] =
|
||||
D_("Frequency (Hz)");
|
||||
port_range_hints[ANALOGUEOSC_FREQ].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440 | LADSPA_HINT_LOGARITHMIC;
|
||||
port_range_hints[ANALOGUEOSC_FREQ].LowerBound = 0.000001;
|
||||
port_range_hints[ANALOGUEOSC_FREQ].UpperBound = 0.499;
|
||||
|
||||
/* Parameters for Warmth */
|
||||
port_descriptors[ANALOGUEOSC_WARM] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
|
||||
port_names[ANALOGUEOSC_WARM] =
|
||||
D_("Warmth");
|
||||
port_range_hints[ANALOGUEOSC_WARM].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0;
|
||||
port_range_hints[ANALOGUEOSC_WARM].LowerBound = 0;
|
||||
port_range_hints[ANALOGUEOSC_WARM].UpperBound = 1;
|
||||
|
||||
/* Parameters for Instability */
|
||||
port_descriptors[ANALOGUEOSC_INSTAB] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
|
||||
port_names[ANALOGUEOSC_INSTAB] =
|
||||
D_("Instability");
|
||||
port_range_hints[ANALOGUEOSC_INSTAB].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0;
|
||||
port_range_hints[ANALOGUEOSC_INSTAB].LowerBound = 0;
|
||||
port_range_hints[ANALOGUEOSC_INSTAB].UpperBound = 1;
|
||||
|
||||
/* Parameters for Output */
|
||||
port_descriptors[ANALOGUEOSC_OUTPUT] =
|
||||
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
|
||||
port_names[ANALOGUEOSC_OUTPUT] =
|
||||
D_("Output");
|
||||
port_range_hints[ANALOGUEOSC_OUTPUT].HintDescriptor = 0;
|
||||
|
||||
analogueOscDescriptor->activate = NULL;
|
||||
analogueOscDescriptor->cleanup = cleanupAnalogueOsc;
|
||||
analogueOscDescriptor->connect_port = connectPortAnalogueOsc;
|
||||
analogueOscDescriptor->deactivate = NULL;
|
||||
analogueOscDescriptor->instantiate = instantiateAnalogueOsc;
|
||||
analogueOscDescriptor->run = runAnalogueOsc;
|
||||
analogueOscDescriptor->run_adding = runAddingAnalogueOsc;
|
||||
analogueOscDescriptor->set_run_adding_gain = setRunAddingGainAnalogueOsc;
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (analogueOscDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)analogueOscDescriptor->PortDescriptors);
|
||||
free((char **)analogueOscDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)analogueOscDescriptor->PortRangeHints);
|
||||
free(analogueOscDescriptor);
|
||||
}
|
||||
analogueOscDescriptor = NULL;
|
||||
|
||||
}
|
||||
@@ -25,6 +25,8 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "bandpass_a_iir_1893.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
|
||||
@@ -68,6 +70,7 @@ static void activateBandpass_a_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 33 "bandpass_a_iir_1893.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -79,6 +82,7 @@ static void activateBandpass_a_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBandpass_a_iir(LADSPA_Handle instance) {
|
||||
#line 39 "bandpass_a_iir_1893.xml"
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -111,11 +115,12 @@ static void connectPortBandpass_a_iir(
|
||||
static LADSPA_Handle instantiateBandpass_a_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)malloc(sizeof(Bandpass_a_iir));
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)calloc(1, sizeof(Bandpass_a_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "bandpass_a_iir_1893.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -135,6 +140,7 @@ static LADSPA_Handle instantiateBandpass_a_iir(
|
||||
|
||||
static void runBandpass_a_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -151,8 +157,12 @@ static void runBandpass_a_iir(LADSPA_Handle instance, unsigned long sample_count
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "bandpass_a_iir_1893.xml"
|
||||
calc_2polebandpass(iirf, gt, center, width, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -168,6 +178,7 @@ static void setRunAddingGainBandpass_a_iir(LADSPA_Handle instance, LADSPA_Data g
|
||||
|
||||
static void runAddingBandpass_a_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_a_iir *plugin_data = (Bandpass_a_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -184,8 +195,12 @@ static void runAddingBandpass_a_iir(LADSPA_Handle instance, unsigned long sample
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "bandpass_a_iir_1893.xml"
|
||||
calc_2polebandpass(iirf, gt, center, width, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -195,7 +210,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -277,12 +291,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (bandpass_a_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)bandpass_a_iirDescriptor->PortDescriptors);
|
||||
free((char **)bandpass_a_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)bandpass_a_iirDescriptor->PortRangeHints);
|
||||
free(bandpass_a_iirDescriptor);
|
||||
}
|
||||
bandpass_a_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "bandpass_iir_1892.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -79,6 +80,7 @@ static void activateBandpass_iir(LADSPA_Handle instance) {
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
iir_stage_t*second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
#line 43 "bandpass_iir_1892.xml"
|
||||
|
||||
ufc = (*(plugin_data->center) + *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
lfc = (*(plugin_data->center) - *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
@@ -100,6 +102,7 @@ static void activateBandpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBandpass_iir(LADSPA_Handle instance) {
|
||||
#line 55 "bandpass_iir_1892.xml"
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->first);
|
||||
@@ -137,17 +140,22 @@ static void connectPortBandpass_iir(
|
||||
static LADSPA_Handle instantiateBandpass_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)malloc(sizeof(Bandpass_iir));
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)calloc(1, sizeof(Bandpass_iir));
|
||||
iir_stage_t*first = NULL;
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
float lfc = 0;
|
||||
long sample_rate = 0;
|
||||
float lfc;
|
||||
long sample_rate;
|
||||
iir_stage_t*second = NULL;
|
||||
float ufc = 0;
|
||||
float ufc;
|
||||
|
||||
#line 24 "bandpass_iir_1892.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
lfc = 0;
|
||||
ufc = 0;
|
||||
|
||||
plugin_data->first = first;
|
||||
plugin_data->gt = gt;
|
||||
plugin_data->iirf = iirf;
|
||||
@@ -169,6 +177,7 @@ static LADSPA_Handle instantiateBandpass_iir(
|
||||
|
||||
static void runBandpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -192,12 +201,16 @@ static void runBandpass_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 31 "bandpass_iir_1892.xml"
|
||||
ufc = (center + width*0.5f)/(float)sample_rate;
|
||||
lfc = (center - width*0.5f)/(float)sample_rate;
|
||||
combine_iir_stages(IIR_STAGE_BANDPASS, gt, first, second,
|
||||
chebyshev(iirf, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f),
|
||||
chebyshev(iirf, second, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, lfc, 0.5f));
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -213,6 +226,7 @@ static void setRunAddingGainBandpass_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingBandpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bandpass_iir *plugin_data = (Bandpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -236,12 +250,16 @@ static void runAddingBandpass_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 31 "bandpass_iir_1892.xml"
|
||||
ufc = (center + width*0.5f)/(float)sample_rate;
|
||||
lfc = (center - width*0.5f)/(float)sample_rate;
|
||||
combine_iir_stages(IIR_STAGE_BANDPASS, gt, first, second,
|
||||
chebyshev(iirf, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f),
|
||||
chebyshev(iirf, second, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, lfc, 0.5f));
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -251,7 +269,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -343,12 +360,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (bandpass_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)bandpass_iirDescriptor->PortDescriptors);
|
||||
free((char **)bandpass_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)bandpass_iirDescriptor->PortRangeHints);
|
||||
free(bandpass_iirDescriptor);
|
||||
}
|
||||
bandpass_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ static void connectPortBodeShifter(
|
||||
static LADSPA_Handle instantiateBodeShifter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
BodeShifter *plugin_data = (BodeShifter *)malloc(sizeof(BodeShifter));
|
||||
BodeShifter *plugin_data = (BodeShifter *)calloc(1, sizeof(BodeShifter));
|
||||
LADSPA_Data *delay = NULL;
|
||||
unsigned int dptr;
|
||||
float fs;
|
||||
@@ -372,7 +372,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -458,12 +457,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (bodeShifterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)bodeShifterDescriptor->PortDescriptors);
|
||||
free((char **)bodeShifterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)bodeShifterDescriptor->PortRangeHints);
|
||||
free(bodeShifterDescriptor);
|
||||
}
|
||||
bodeShifterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ static void connectPortBodeShifterCV(
|
||||
static LADSPA_Handle instantiateBodeShifterCV(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
BodeShifterCV *plugin_data = (BodeShifterCV *)malloc(sizeof(BodeShifterCV));
|
||||
BodeShifterCV *plugin_data = (BodeShifterCV *)calloc(1, sizeof(BodeShifterCV));
|
||||
LADSPA_Data *delay = NULL;
|
||||
unsigned int dptr;
|
||||
float fs;
|
||||
@@ -400,7 +400,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -523,12 +522,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (bodeShifterCVDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)bodeShifterCVDescriptor->PortDescriptors);
|
||||
free((char **)bodeShifterCVDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)bodeShifterCVDescriptor->PortRangeHints);
|
||||
free(bodeShifterCVDescriptor);
|
||||
}
|
||||
bodeShifterCVDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "butterworth_1902.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -110,6 +111,7 @@ static void activateBwxover_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 34 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -123,6 +125,7 @@ static void activateBwxover_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupBwxover_iir(LADSPA_Handle instance) {
|
||||
#line 42 "butterworth_1902.xml"
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -158,11 +161,12 @@ static void connectPortBwxover_iir(
|
||||
static LADSPA_Handle instantiateBwxover_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)malloc(sizeof(Bwxover_iir));
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)calloc(1, sizeof(Bwxover_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -182,6 +186,7 @@ static LADSPA_Handle instantiateBwxover_iir(
|
||||
|
||||
static void runBwxover_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -201,9 +206,13 @@ static void runBwxover_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, lpoutput, sample_count,0);
|
||||
buffer_sub(input, lpoutput, hpoutput, sample_count);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -219,6 +228,7 @@ static void setRunAddingGainBwxover_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingBwxover_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Bwxover_iir *plugin_data = (Bwxover_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -238,9 +248,13 @@ static void runAddingBwxover_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, lpoutput, sample_count,0);
|
||||
buffer_sub(input, lpoutput, hpoutput, sample_count);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
static void activateButtlow_iir(LADSPA_Handle instance) {
|
||||
@@ -248,6 +262,7 @@ static void activateButtlow_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 34 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -261,6 +276,7 @@ static void activateButtlow_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupButtlow_iir(LADSPA_Handle instance) {
|
||||
#line 42 "butterworth_1902.xml"
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -293,11 +309,12 @@ static void connectPortButtlow_iir(
|
||||
static LADSPA_Handle instantiateButtlow_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)malloc(sizeof(Buttlow_iir));
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)calloc(1, sizeof(Buttlow_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -317,6 +334,7 @@ static LADSPA_Handle instantiateButtlow_iir(
|
||||
|
||||
static void runButtlow_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -333,8 +351,12 @@ static void runButtlow_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -350,6 +372,7 @@ static void setRunAddingGainButtlow_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingButtlow_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Buttlow_iir *plugin_data = (Buttlow_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -366,8 +389,12 @@ static void runAddingButtlow_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
static void activateButthigh_iir(LADSPA_Handle instance) {
|
||||
@@ -375,6 +402,7 @@ static void activateButthigh_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 34 "butterworth_1902.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -388,6 +416,7 @@ static void activateButthigh_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupButthigh_iir(LADSPA_Handle instance) {
|
||||
#line 42 "butterworth_1902.xml"
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -420,11 +449,12 @@ static void connectPortButthigh_iir(
|
||||
static LADSPA_Handle instantiateButthigh_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)malloc(sizeof(Butthigh_iir));
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)calloc(1, sizeof(Butthigh_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 22 "butterworth_1902.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -444,6 +474,7 @@ static LADSPA_Handle instantiateButthigh_iir(
|
||||
|
||||
static void runButthigh_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -460,8 +491,12 @@ static void runButthigh_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 1, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -477,6 +512,7 @@ static void setRunAddingGainButthigh_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingButthigh_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Butthigh_iir *plugin_data = (Butthigh_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (Hz) (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -493,8 +529,12 @@ static void runAddingButthigh_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 25 "butterworth_1902.xml"
|
||||
butterworth_stage(gt, 1, cutoff, resonance, sample_rate);
|
||||
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -504,7 +544,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -741,24 +780,27 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (bwxover_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)bwxover_iirDescriptor->PortDescriptors);
|
||||
free((char **)bwxover_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)bwxover_iirDescriptor->PortRangeHints);
|
||||
free(bwxover_iirDescriptor);
|
||||
}
|
||||
bwxover_iirDescriptor = NULL;
|
||||
if (buttlow_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)buttlow_iirDescriptor->PortDescriptors);
|
||||
free((char **)buttlow_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)buttlow_iirDescriptor->PortRangeHints);
|
||||
free(buttlow_iirDescriptor);
|
||||
}
|
||||
buttlow_iirDescriptor = NULL;
|
||||
if (butthigh_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)butthigh_iirDescriptor->PortDescriptors);
|
||||
free((char **)butthigh_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)butthigh_iirDescriptor->PortRangeHints);
|
||||
free(butthigh_iirDescriptor);
|
||||
}
|
||||
butthigh_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ static void connectPortChebstortion(
|
||||
static LADSPA_Handle instantiateChebstortion(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Chebstortion *plugin_data = (Chebstortion *)malloc(sizeof(Chebstortion));
|
||||
Chebstortion *plugin_data = (Chebstortion *)calloc(1, sizeof(Chebstortion));
|
||||
unsigned int count;
|
||||
float env;
|
||||
float itm1;
|
||||
@@ -321,7 +321,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -399,12 +398,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (chebstortionDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)chebstortionDescriptor->PortDescriptors);
|
||||
free((char **)chebstortionDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)chebstortionDescriptor->PortRangeHints);
|
||||
free(chebstortionDescriptor);
|
||||
}
|
||||
chebstortionDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ static void connectPortComb(
|
||||
static LADSPA_Handle instantiateComb(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Comb *plugin_data = (Comb *)malloc(sizeof(Comb));
|
||||
Comb *plugin_data = (Comb *)calloc(1, sizeof(Comb));
|
||||
long comb_pos;
|
||||
LADSPA_Data *comb_tbl = NULL;
|
||||
float last_offset;
|
||||
@@ -258,7 +258,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -340,12 +339,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (combDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)combDescriptor->PortDescriptors);
|
||||
free((char **)combDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)combDescriptor->PortRangeHints);
|
||||
free(combDescriptor);
|
||||
}
|
||||
combDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "comb_1887.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -151,6 +152,7 @@ static void activateComb_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 53 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -182,6 +184,7 @@ static void activateComb_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_n(LADSPA_Handle instance) {
|
||||
#line 75 "comb_1887.xml"
|
||||
Comb_n *plugin_data = (Comb_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -216,18 +219,27 @@ static void connectPortComb_n(
|
||||
static LADSPA_Handle instantiateComb_n(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Comb_n *plugin_data = (Comb_n *)malloc(sizeof(Comb_n));
|
||||
Comb_n *plugin_data = (Comb_n *)calloc(1, sizeof(Comb_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -274,7 +286,8 @@ static void runComb_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay; /* stop gcc complaining */
|
||||
|
||||
@@ -412,7 +425,8 @@ static void runAddingComb_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay; /* stop gcc complaining */
|
||||
|
||||
@@ -522,6 +536,7 @@ static void activateComb_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 53 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -553,6 +568,7 @@ static void activateComb_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_l(LADSPA_Handle instance) {
|
||||
#line 75 "comb_1887.xml"
|
||||
Comb_l *plugin_data = (Comb_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -587,18 +603,27 @@ static void connectPortComb_l(
|
||||
static LADSPA_Handle instantiateComb_l(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Comb_l *plugin_data = (Comb_l *)malloc(sizeof(Comb_l));
|
||||
Comb_l *plugin_data = (Comb_l *)calloc(1, sizeof(Comb_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -645,7 +670,8 @@ static void runComb_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -741,7 +767,8 @@ static void runAddingComb_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -809,6 +836,7 @@ static void activateComb_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 53 "comb_1887.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -840,6 +868,7 @@ static void activateComb_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupComb_c(LADSPA_Handle instance) {
|
||||
#line 75 "comb_1887.xml"
|
||||
Comb_c *plugin_data = (Comb_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -874,18 +903,27 @@ static void connectPortComb_c(
|
||||
static LADSPA_Handle instantiateComb_c(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Comb_c *plugin_data = (Comb_c *)malloc(sizeof(Comb_c));
|
||||
Comb_c *plugin_data = (Comb_c *)calloc(1, sizeof(Comb_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data feedback = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data feedback;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 41 "comb_1887.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
feedback = 0;
|
||||
last_decay_time = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -932,7 +970,8 @@ static void runComb_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -1032,7 +1071,8 @@ static void runAddingComb_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 79 "comb_1887.xml"
|
||||
int i;
|
||||
|
||||
i = max_delay;
|
||||
|
||||
@@ -1101,7 +1141,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -1352,24 +1391,27 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (comb_nDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)comb_nDescriptor->PortDescriptors);
|
||||
free((char **)comb_nDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)comb_nDescriptor->PortRangeHints);
|
||||
free(comb_nDescriptor);
|
||||
}
|
||||
comb_nDescriptor = NULL;
|
||||
if (comb_lDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)comb_lDescriptor->PortDescriptors);
|
||||
free((char **)comb_lDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)comb_lDescriptor->PortRangeHints);
|
||||
free(comb_lDescriptor);
|
||||
}
|
||||
comb_lDescriptor = NULL;
|
||||
if (comb_cDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)comb_cDescriptor->PortDescriptors);
|
||||
free((char **)comb_cDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)comb_cDescriptor->PortRangeHints);
|
||||
free(comb_cDescriptor);
|
||||
}
|
||||
comb_cDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ static void connectPortCombSplitter(
|
||||
static LADSPA_Handle instantiateCombSplitter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
CombSplitter *plugin_data = (CombSplitter *)malloc(sizeof(CombSplitter));
|
||||
CombSplitter *plugin_data = (CombSplitter *)calloc(1, sizeof(CombSplitter));
|
||||
long comb_pos;
|
||||
LADSPA_Data *comb_tbl = NULL;
|
||||
float last_offset;
|
||||
@@ -262,7 +262,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -341,12 +340,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (combSplitterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)combSplitterDescriptor->PortDescriptors);
|
||||
free((char **)combSplitterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)combSplitterDescriptor->PortRangeHints);
|
||||
free(combSplitterDescriptor);
|
||||
}
|
||||
combSplitterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static void connectPortConst(
|
||||
static LADSPA_Handle instantiateConst(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Const *plugin_data = (Const *)malloc(sizeof(Const));
|
||||
Const *plugin_data = (Const *)calloc(1, sizeof(Const));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -178,7 +178,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -250,12 +249,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (constDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)constDescriptor->PortDescriptors);
|
||||
free((char **)constDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)constDescriptor->PortRangeHints);
|
||||
free(constDescriptor);
|
||||
}
|
||||
constDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ static void connectPortCrossoverDist(
|
||||
static LADSPA_Handle instantiateCrossoverDist(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
CrossoverDist *plugin_data = (CrossoverDist *)malloc(sizeof(CrossoverDist));
|
||||
CrossoverDist *plugin_data = (CrossoverDist *)calloc(1, sizeof(CrossoverDist));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -194,7 +194,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -276,12 +275,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (crossoverDistDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)crossoverDistDescriptor->PortDescriptors);
|
||||
free((char **)crossoverDistDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)crossoverDistDescriptor->PortRangeHints);
|
||||
free(crossoverDistDescriptor);
|
||||
}
|
||||
crossoverDistDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static void connectPortDcRemove(
|
||||
static LADSPA_Handle instantiateDcRemove(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
DcRemove *plugin_data = (DcRemove *)malloc(sizeof(DcRemove));
|
||||
DcRemove *plugin_data = (DcRemove *)calloc(1, sizeof(DcRemove));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -173,7 +173,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -235,12 +234,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (dcRemoveDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)dcRemoveDescriptor->PortDescriptors);
|
||||
free((char **)dcRemoveDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)dcRemoveDescriptor->PortRangeHints);
|
||||
free(dcRemoveDescriptor);
|
||||
}
|
||||
dcRemoveDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "decay_1886.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -72,6 +73,7 @@ static void activateDecay(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_decay_time = plugin_data->last_decay_time;
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
#line 34 "decay_1886.xml"
|
||||
b = 0.f;
|
||||
y = 0.f;
|
||||
last_decay_time = 0.f;
|
||||
@@ -111,15 +113,22 @@ static void connectPortDecay(
|
||||
static LADSPA_Handle instantiateDecay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Decay *plugin_data = (Decay *)malloc(sizeof(Decay));
|
||||
LADSPA_Data b = 0;
|
||||
char first_time = 0;
|
||||
LADSPA_Data last_decay_time = 0;
|
||||
LADSPA_Data sample_rate = 0;
|
||||
LADSPA_Data y = 0;
|
||||
Decay *plugin_data = (Decay *)calloc(1, sizeof(Decay));
|
||||
LADSPA_Data b;
|
||||
char first_time;
|
||||
LADSPA_Data last_decay_time;
|
||||
LADSPA_Data sample_rate;
|
||||
LADSPA_Data y;
|
||||
|
||||
#line 24 "decay_1886.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
b = 0;
|
||||
first_time = 0;
|
||||
last_decay_time = 0;
|
||||
y = 0;
|
||||
|
||||
plugin_data->b = b;
|
||||
plugin_data->first_time = first_time;
|
||||
plugin_data->last_decay_time = last_decay_time;
|
||||
@@ -154,7 +163,8 @@ static void runDecay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
|
||||
unsigned int i;
|
||||
#line 41 "decay_1886.xml"
|
||||
int i;
|
||||
|
||||
if (first_time) {
|
||||
plugin_data->last_decay_time = decay_time;
|
||||
@@ -215,7 +225,8 @@ static void runAddingDecay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
LADSPA_Data sample_rate = plugin_data->sample_rate;
|
||||
LADSPA_Data y = plugin_data->y;
|
||||
|
||||
unsigned int i;
|
||||
#line 41 "decay_1886.xml"
|
||||
int i;
|
||||
|
||||
if (first_time) {
|
||||
plugin_data->last_decay_time = decay_time;
|
||||
@@ -254,7 +265,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -325,12 +335,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (decayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)decayDescriptor->PortDescriptors);
|
||||
free((char **)decayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)decayDescriptor->PortRangeHints);
|
||||
free(decayDescriptor);
|
||||
}
|
||||
decayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ static void connectPortDecimator(
|
||||
static LADSPA_Handle instantiateDecimator(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Decimator *plugin_data = (Decimator *)malloc(sizeof(Decimator));
|
||||
Decimator *plugin_data = (Decimator *)calloc(1, sizeof(Decimator));
|
||||
float count;
|
||||
LADSPA_Data last_out;
|
||||
long sample_rate;
|
||||
@@ -247,7 +247,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -335,12 +334,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (decimatorDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)decimatorDescriptor->PortDescriptors);
|
||||
free((char **)decimatorDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)decimatorDescriptor->PortRangeHints);
|
||||
free(decimatorDescriptor);
|
||||
}
|
||||
decimatorDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ static void connectPortDeclip(
|
||||
static LADSPA_Handle instantiateDeclip(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Declip *plugin_data = (Declip *)malloc(sizeof(Declip));
|
||||
Declip *plugin_data = (Declip *)calloc(1, sizeof(Declip));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -167,7 +167,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -235,12 +234,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (declipDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)declipDescriptor->PortDescriptors);
|
||||
free((char **)declipDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)declipDescriptor->PortRangeHints);
|
||||
free(declipDescriptor);
|
||||
}
|
||||
declipDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "delay_1898.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -122,6 +123,7 @@ static void activateDelay_n(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 37 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -151,6 +153,7 @@ static void activateDelay_n(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_n(LADSPA_Handle instance) {
|
||||
#line 59 "delay_1898.xml"
|
||||
Delay_n *plugin_data = (Delay_n *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -182,16 +185,23 @@ static void connectPortDelay_n(
|
||||
static LADSPA_Handle instantiateDelay_n(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Delay_n *plugin_data = (Delay_n *)malloc(sizeof(Delay_n));
|
||||
Delay_n *plugin_data = (Delay_n *)calloc(1, sizeof(Delay_n));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -219,6 +229,9 @@ static void runDelay_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -228,7 +241,8 @@ static void runDelay_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -286,6 +300,9 @@ static void runDelay_n(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -309,6 +326,9 @@ static void runAddingDelay_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -318,7 +338,8 @@ static void runAddingDelay_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -376,6 +397,9 @@ static void runAddingDelay_n(LADSPA_Handle instance, unsigned long sample_count)
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
|
||||
static void activateDelay_l(LADSPA_Handle instance) {
|
||||
@@ -386,6 +410,7 @@ static void activateDelay_l(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 37 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -415,6 +440,7 @@ static void activateDelay_l(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_l(LADSPA_Handle instance) {
|
||||
#line 59 "delay_1898.xml"
|
||||
Delay_l *plugin_data = (Delay_l *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -446,16 +472,23 @@ static void connectPortDelay_l(
|
||||
static LADSPA_Handle instantiateDelay_l(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Delay_l *plugin_data = (Delay_l *)malloc(sizeof(Delay_l));
|
||||
Delay_l *plugin_data = (Delay_l *)calloc(1, sizeof(Delay_l));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -483,6 +516,9 @@ static void runDelay_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -492,7 +528,8 @@ static void runDelay_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -538,6 +575,9 @@ static void runDelay_l(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -561,6 +601,9 @@ static void runAddingDelay_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -570,7 +613,8 @@ static void runAddingDelay_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -616,6 +660,9 @@ static void runAddingDelay_l(LADSPA_Handle instance, unsigned long sample_count)
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
|
||||
static void activateDelay_c(LADSPA_Handle instance) {
|
||||
@@ -626,6 +673,7 @@ static void activateDelay_c(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 37 "delay_1898.xml"
|
||||
unsigned int minsize, size;
|
||||
|
||||
if (plugin_data->max_delay && *plugin_data->max_delay > 0)
|
||||
@@ -655,6 +703,7 @@ static void activateDelay_c(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDelay_c(LADSPA_Handle instance) {
|
||||
#line 59 "delay_1898.xml"
|
||||
Delay_c *plugin_data = (Delay_c *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -686,16 +735,23 @@ static void connectPortDelay_c(
|
||||
static LADSPA_Handle instantiateDelay_c(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Delay_c *plugin_data = (Delay_c *)malloc(sizeof(Delay_c));
|
||||
Delay_c *plugin_data = (Delay_c *)calloc(1, sizeof(Delay_c));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask = 0;
|
||||
LADSPA_Data delay_samples = 0;
|
||||
LADSPA_Data last_delay_time = 0;
|
||||
unsigned int sample_rate = 0;
|
||||
long write_phase = 0;
|
||||
unsigned int buffer_mask;
|
||||
LADSPA_Data delay_samples;
|
||||
LADSPA_Data last_delay_time;
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 27 "delay_1898.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
// Uninitialized variables
|
||||
buffer_mask = 0;
|
||||
delay_samples = 0;
|
||||
last_delay_time = 0;
|
||||
write_phase = 0;
|
||||
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->delay_samples = delay_samples;
|
||||
@@ -723,6 +779,9 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -732,7 +791,8 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -780,6 +840,9 @@ static void runDelay_c(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -803,6 +866,9 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const out = plugin_data->out;
|
||||
|
||||
/* Max Delay (s) (float value) */
|
||||
const LADSPA_Data max_delay = *(plugin_data->max_delay);
|
||||
|
||||
/* Delay Time (s) (float value) */
|
||||
const LADSPA_Data delay_time = *(plugin_data->delay_time);
|
||||
LADSPA_Data * buffer = plugin_data->buffer;
|
||||
@@ -812,7 +878,8 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
unsigned int i;
|
||||
#line 63 "delay_1898.xml"
|
||||
int i;
|
||||
|
||||
if (write_phase == 0) {
|
||||
plugin_data->last_delay_time = delay_time;
|
||||
@@ -860,6 +927,9 @@ static void runAddingDelay_c(LADSPA_Handle instance, unsigned long sample_count)
|
||||
}
|
||||
|
||||
plugin_data->write_phase = write_phase;
|
||||
|
||||
// Unused variable
|
||||
(void)(max_delay);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -869,7 +939,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -1093,24 +1162,27 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (delay_nDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)delay_nDescriptor->PortDescriptors);
|
||||
free((char **)delay_nDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)delay_nDescriptor->PortRangeHints);
|
||||
free(delay_nDescriptor);
|
||||
}
|
||||
delay_nDescriptor = NULL;
|
||||
if (delay_lDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)delay_lDescriptor->PortDescriptors);
|
||||
free((char **)delay_lDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)delay_lDescriptor->PortRangeHints);
|
||||
free(delay_lDescriptor);
|
||||
}
|
||||
delay_lDescriptor = NULL;
|
||||
if (delay_cDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)delay_cDescriptor->PortDescriptors);
|
||||
free((char **)delay_cDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)delay_cDescriptor->PortRangeHints);
|
||||
free(delay_cDescriptor);
|
||||
}
|
||||
delay_cDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ static void connectPortDelayorama(
|
||||
static LADSPA_Handle instantiateDelayorama(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Delayorama *plugin_data = (Delayorama *)malloc(sizeof(Delayorama));
|
||||
Delayorama *plugin_data = (Delayorama *)calloc(1, sizeof(Delayorama));
|
||||
unsigned int active_set;
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned long buffer_pos;
|
||||
@@ -675,7 +675,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -847,12 +846,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (delayoramaDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)delayoramaDescriptor->PortDescriptors);
|
||||
free((char **)delayoramaDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)delayoramaDescriptor->PortRangeHints);
|
||||
free(delayoramaDescriptor);
|
||||
}
|
||||
delayoramaDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortDiode(
|
||||
static LADSPA_Handle instantiateDiode(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Diode *plugin_data = (Diode *)malloc(sizeof(Diode));
|
||||
Diode *plugin_data = (Diode *)calloc(1, sizeof(Diode));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -192,7 +192,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -264,12 +263,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (diodeDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)diodeDescriptor->PortDescriptors);
|
||||
free((char **)diodeDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)diodeDescriptor->PortRangeHints);
|
||||
free(diodeDescriptor);
|
||||
}
|
||||
diodeDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ static void connectPortDivider(
|
||||
static LADSPA_Handle instantiateDivider(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Divider *plugin_data = (Divider *)malloc(sizeof(Divider));
|
||||
Divider *plugin_data = (Divider *)calloc(1, sizeof(Divider));
|
||||
LADSPA_Data amp;
|
||||
float count;
|
||||
LADSPA_Data lamp;
|
||||
@@ -256,7 +256,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -331,12 +330,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (dividerDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)dividerDescriptor->PortDescriptors);
|
||||
free((char **)dividerDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)dividerDescriptor->PortRangeHints);
|
||||
free(dividerDescriptor);
|
||||
}
|
||||
dividerDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ static void activateDj_eq_mono(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDj_eq_mono(LADSPA_Handle instance) {
|
||||
#line 60 "dj_eq_1901.xml"
|
||||
Dj_eq_mono *plugin_data = (Dj_eq_mono *)instance;
|
||||
free(plugin_data->filters);
|
||||
free(instance);
|
||||
@@ -153,7 +154,7 @@ static void connectPortDj_eq_mono(
|
||||
static LADSPA_Handle instantiateDj_eq_mono(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Dj_eq_mono *plugin_data = (Dj_eq_mono *)malloc(sizeof(Dj_eq_mono));
|
||||
Dj_eq_mono *plugin_data = (Dj_eq_mono *)calloc(1, sizeof(Dj_eq_mono));
|
||||
biquad *filters = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -285,6 +286,7 @@ static void activateDj_eq(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupDj_eq(LADSPA_Handle instance) {
|
||||
#line 60 "dj_eq_1901.xml"
|
||||
Dj_eq *plugin_data = (Dj_eq *)instance;
|
||||
free(plugin_data->filters);
|
||||
free(instance);
|
||||
@@ -328,7 +330,7 @@ static void connectPortDj_eq(
|
||||
static LADSPA_Handle instantiateDj_eq(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Dj_eq *plugin_data = (Dj_eq *)malloc(sizeof(Dj_eq));
|
||||
Dj_eq *plugin_data = (Dj_eq *)calloc(1, sizeof(Dj_eq));
|
||||
biquad *filters = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -474,7 +476,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -678,18 +679,20 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (dj_eq_monoDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)dj_eq_monoDescriptor->PortDescriptors);
|
||||
free((char **)dj_eq_monoDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)dj_eq_monoDescriptor->PortRangeHints);
|
||||
free(dj_eq_monoDescriptor);
|
||||
}
|
||||
dj_eq_monoDescriptor = NULL;
|
||||
if (dj_eqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)dj_eqDescriptor->PortDescriptors);
|
||||
free((char **)dj_eqDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)dj_eqDescriptor->PortRangeHints);
|
||||
free(dj_eqDescriptor);
|
||||
}
|
||||
dj_eqDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ static void connectPortDjFlanger(
|
||||
static LADSPA_Handle instantiateDjFlanger(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
DjFlanger *plugin_data = (DjFlanger *)malloc(sizeof(DjFlanger));
|
||||
DjFlanger *plugin_data = (DjFlanger *)calloc(1, sizeof(DjFlanger));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
unsigned int buffer_pos;
|
||||
@@ -373,7 +373,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -472,12 +471,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (djFlangerDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)djFlangerDescriptor->PortDescriptors);
|
||||
free((char **)djFlangerDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)djFlangerDescriptor->PortRangeHints);
|
||||
free(djFlangerDescriptor);
|
||||
}
|
||||
djFlangerDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ static void connectPortDysonCompress(
|
||||
static LADSPA_Handle instantiateDysonCompress(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
DysonCompress *plugin_data = (DysonCompress *)malloc(sizeof(DysonCompress));
|
||||
DysonCompress *plugin_data = (DysonCompress *)calloc(1, sizeof(DysonCompress));
|
||||
LADSPA_Data *delay = NULL;
|
||||
float extra_maxlevel;
|
||||
float lastrgain;
|
||||
@@ -783,7 +783,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -885,12 +884,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (dysonCompressDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)dysonCompressDescriptor->PortDescriptors);
|
||||
free((char **)dysonCompressDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)dysonCompressDescriptor->PortRangeHints);
|
||||
free(dysonCompressDescriptor);
|
||||
}
|
||||
dysonCompressDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 8 "fad_delay_1192.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
|
||||
@@ -78,7 +79,8 @@ static void activateFadDelay(LADSPA_Handle instance) {
|
||||
int last_phase = plugin_data->last_phase;
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
unsigned int i;
|
||||
#line 35 "fad_delay_1192.xml"
|
||||
int i;
|
||||
|
||||
for (i = 0; i < buffer_size; i++) {
|
||||
buffer[i] = 0;
|
||||
@@ -86,6 +88,7 @@ static void activateFadDelay(LADSPA_Handle instance) {
|
||||
phase = 0;
|
||||
last_phase = 0;
|
||||
last_in = 0.0f;
|
||||
sample_rate = sample_rate;
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_mask = buffer_mask;
|
||||
plugin_data->buffer_size = buffer_size;
|
||||
@@ -97,6 +100,7 @@ static void activateFadDelay(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupFadDelay(LADSPA_Handle instance) {
|
||||
#line 47 "fad_delay_1192.xml"
|
||||
FadDelay *plugin_data = (FadDelay *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -128,7 +132,7 @@ static void connectPortFadDelay(
|
||||
static LADSPA_Handle instantiateFadDelay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
FadDelay *plugin_data = (FadDelay *)malloc(sizeof(FadDelay));
|
||||
FadDelay *plugin_data = (FadDelay *)calloc(1, sizeof(FadDelay));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned long buffer_mask;
|
||||
unsigned long buffer_size;
|
||||
@@ -137,6 +141,7 @@ static LADSPA_Handle instantiateFadDelay(
|
||||
float phase;
|
||||
long sample_rate;
|
||||
|
||||
#line 21 "fad_delay_1192.xml"
|
||||
unsigned int min_bs;
|
||||
|
||||
sample_rate = s_rate;
|
||||
@@ -190,7 +195,8 @@ static void runFadDelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
unsigned long int pos;
|
||||
#line 51 "fad_delay_1192.xml"
|
||||
long int pos;
|
||||
float increment = (float)buffer_size / ((float)sample_rate *
|
||||
f_max(fabs(delay), 0.01));
|
||||
float lin_int, lin_inc;
|
||||
@@ -261,7 +267,8 @@ static void runAddingFadDelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
float phase = plugin_data->phase;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
unsigned long int pos;
|
||||
#line 51 "fad_delay_1192.xml"
|
||||
long int pos;
|
||||
float increment = (float)buffer_size / ((float)sample_rate *
|
||||
f_max(fabs(delay), 0.01));
|
||||
float lin_int, lin_inc;
|
||||
@@ -305,7 +312,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -387,12 +393,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (fadDelayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)fadDelayDescriptor->PortDescriptors);
|
||||
free((char **)fadDelayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)fadDelayDescriptor->PortRangeHints);
|
||||
free(fadDelayDescriptor);
|
||||
}
|
||||
fadDelayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ static void connectPortFastLookaheadLimiter(
|
||||
static LADSPA_Handle instantiateFastLookaheadLimiter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
FastLookaheadLimiter *plugin_data = (FastLookaheadLimiter *)malloc(sizeof(FastLookaheadLimiter));
|
||||
FastLookaheadLimiter *plugin_data = (FastLookaheadLimiter *)calloc(1, sizeof(FastLookaheadLimiter));
|
||||
float atten;
|
||||
float atten_lp;
|
||||
LADSPA_Data *buffer = NULL;
|
||||
@@ -581,7 +581,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -704,12 +703,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (fastLookaheadLimiterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)fastLookaheadLimiterDescriptor->PortDescriptors);
|
||||
free((char **)fastLookaheadLimiterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)fastLookaheadLimiterDescriptor->PortRangeHints);
|
||||
free(fastLookaheadLimiterDescriptor);
|
||||
}
|
||||
fastLookaheadLimiterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ static void connectPortFlanger(
|
||||
static LADSPA_Handle instantiateFlanger(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Flanger *plugin_data = (Flanger *)malloc(sizeof(Flanger));
|
||||
Flanger *plugin_data = (Flanger *)calloc(1, sizeof(Flanger));
|
||||
long count;
|
||||
long delay_pos;
|
||||
long delay_size;
|
||||
@@ -442,7 +442,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -544,12 +543,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (flangerDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)flangerDescriptor->PortDescriptors);
|
||||
free((char **)flangerDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)flangerDescriptor->PortRangeHints);
|
||||
free(flangerDescriptor);
|
||||
}
|
||||
flangerDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
272
plugins/LadspaEffect/swh/fm_osc_1415.c
Normal file
272
plugins/LadspaEffect/swh/fm_osc_1415.c
Normal file
@@ -0,0 +1,272 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "ladspa.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WINDOWS_DLL_EXPORT_ __declspec(dllexport)
|
||||
int bIsFirstTime = 1;
|
||||
void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#else
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "fm_osc_1415.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
#include "util/blo.h"
|
||||
|
||||
#define FMOSC_WAVE 0
|
||||
#define FMOSC_FM 1
|
||||
#define FMOSC_OUTPUT 2
|
||||
|
||||
static LADSPA_Descriptor *fmOscDescriptor = NULL;
|
||||
|
||||
typedef struct {
|
||||
LADSPA_Data *wave;
|
||||
LADSPA_Data *fm;
|
||||
LADSPA_Data *output;
|
||||
blo_h_osc * osc;
|
||||
blo_h_tables *tables;
|
||||
LADSPA_Data run_adding_gain;
|
||||
} FmOsc;
|
||||
|
||||
_WINDOWS_DLL_EXPORT_
|
||||
const LADSPA_Descriptor *ladspa_descriptor(unsigned long index) {
|
||||
|
||||
#ifdef WIN32
|
||||
if (bIsFirstTime) {
|
||||
swh_init();
|
||||
bIsFirstTime = 0;
|
||||
}
|
||||
#endif
|
||||
switch (index) {
|
||||
case 0:
|
||||
return fmOscDescriptor;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void cleanupFmOsc(LADSPA_Handle instance) {
|
||||
#line 37 "fm_osc_1415.xml"
|
||||
FmOsc *plugin_data = (FmOsc *)instance;
|
||||
blo_h_tables_free(plugin_data->tables);
|
||||
blo_h_free(plugin_data->osc);
|
||||
free(instance);
|
||||
}
|
||||
|
||||
static void connectPortFmOsc(
|
||||
LADSPA_Handle instance,
|
||||
unsigned long port,
|
||||
LADSPA_Data *data) {
|
||||
FmOsc *plugin;
|
||||
|
||||
plugin = (FmOsc *)instance;
|
||||
switch (port) {
|
||||
case FMOSC_WAVE:
|
||||
plugin->wave = data;
|
||||
break;
|
||||
case FMOSC_FM:
|
||||
plugin->fm = data;
|
||||
break;
|
||||
case FMOSC_OUTPUT:
|
||||
plugin->output = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static LADSPA_Handle instantiateFmOsc(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
FmOsc *plugin_data = (FmOsc *)calloc(1, sizeof(FmOsc));
|
||||
blo_h_osc *osc = NULL;
|
||||
blo_h_tables *tables = NULL;
|
||||
|
||||
#line 20 "fm_osc_1415.xml"
|
||||
tables = blo_h_tables_new(1024);
|
||||
osc = blo_h_new(tables, BLO_SINE, (float)s_rate);
|
||||
|
||||
plugin_data->osc = osc;
|
||||
plugin_data->tables = tables;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
}
|
||||
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
#undef RUN_REPLACING
|
||||
|
||||
#define buffer_write(b, v) (b = v)
|
||||
#define RUN_ADDING 0
|
||||
#define RUN_REPLACING 1
|
||||
|
||||
static void runFmOsc(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
FmOsc *plugin_data = (FmOsc *)instance;
|
||||
|
||||
/* Waveform (1=sin, 2=tri, 3=squ, 4=saw) (float value) */
|
||||
const LADSPA_Data wave = *(plugin_data->wave);
|
||||
|
||||
/* Frequency (Hz) (array of floats of length sample_count) */
|
||||
const LADSPA_Data * const fm = plugin_data->fm;
|
||||
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const output = plugin_data->output;
|
||||
blo_h_osc * osc = plugin_data->osc;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
|
||||
#line 25 "fm_osc_1415.xml"
|
||||
unsigned long pos;
|
||||
osc->wave = LIMIT(f_round(wave) - 1, 0, BLO_N_WAVES-1);
|
||||
|
||||
tables = tables; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
blo_hd_set_freq(osc, fm[pos]);
|
||||
buffer_write(output[pos], blo_hd_run_cub(osc));
|
||||
}
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
#undef RUN_REPLACING
|
||||
|
||||
#define buffer_write(b, v) (b += (v) * run_adding_gain)
|
||||
#define RUN_ADDING 1
|
||||
#define RUN_REPLACING 0
|
||||
|
||||
static void setRunAddingGainFmOsc(LADSPA_Handle instance, LADSPA_Data gain) {
|
||||
((FmOsc *)instance)->run_adding_gain = gain;
|
||||
}
|
||||
|
||||
static void runAddingFmOsc(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
FmOsc *plugin_data = (FmOsc *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Waveform (1=sin, 2=tri, 3=squ, 4=saw) (float value) */
|
||||
const LADSPA_Data wave = *(plugin_data->wave);
|
||||
|
||||
/* Frequency (Hz) (array of floats of length sample_count) */
|
||||
const LADSPA_Data * const fm = plugin_data->fm;
|
||||
|
||||
/* Output (array of floats of length sample_count) */
|
||||
LADSPA_Data * const output = plugin_data->output;
|
||||
blo_h_osc * osc = plugin_data->osc;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
|
||||
#line 25 "fm_osc_1415.xml"
|
||||
unsigned long pos;
|
||||
osc->wave = LIMIT(f_round(wave) - 1, 0, BLO_N_WAVES-1);
|
||||
|
||||
tables = tables; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
blo_hd_set_freq(osc, fm[pos]);
|
||||
buffer_write(output[pos], blo_hd_run_cub(osc));
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
LADSPA_PortRangeHint *port_range_hints;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
#endif
|
||||
|
||||
|
||||
fmOscDescriptor =
|
||||
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
|
||||
|
||||
if (fmOscDescriptor) {
|
||||
fmOscDescriptor->UniqueID = 1415;
|
||||
fmOscDescriptor->Label = "fmOsc";
|
||||
fmOscDescriptor->Properties =
|
||||
LADSPA_PROPERTY_HARD_RT_CAPABLE;
|
||||
fmOscDescriptor->Name =
|
||||
D_("FM Oscillator");
|
||||
fmOscDescriptor->Maker =
|
||||
"Steve Harris <steve@plugin.org.uk>";
|
||||
fmOscDescriptor->Copyright =
|
||||
"GPL";
|
||||
fmOscDescriptor->PortCount = 3;
|
||||
|
||||
port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
|
||||
sizeof(LADSPA_PortDescriptor));
|
||||
fmOscDescriptor->PortDescriptors =
|
||||
(const LADSPA_PortDescriptor *)port_descriptors;
|
||||
|
||||
port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
|
||||
sizeof(LADSPA_PortRangeHint));
|
||||
fmOscDescriptor->PortRangeHints =
|
||||
(const LADSPA_PortRangeHint *)port_range_hints;
|
||||
|
||||
port_names = (char **)calloc(3, sizeof(char*));
|
||||
fmOscDescriptor->PortNames =
|
||||
(const char **)port_names;
|
||||
|
||||
/* Parameters for Waveform (1=sin, 2=tri, 3=squ, 4=saw) */
|
||||
port_descriptors[FMOSC_WAVE] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
|
||||
port_names[FMOSC_WAVE] =
|
||||
D_("Waveform (1=sin, 2=tri, 3=squ, 4=saw)");
|
||||
port_range_hints[FMOSC_WAVE].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_DEFAULT_1;
|
||||
port_range_hints[FMOSC_WAVE].LowerBound = 1;
|
||||
port_range_hints[FMOSC_WAVE].UpperBound = BLO_N_WAVES;
|
||||
|
||||
/* Parameters for Frequency (Hz) */
|
||||
port_descriptors[FMOSC_FM] =
|
||||
LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
|
||||
port_names[FMOSC_FM] =
|
||||
D_("Frequency (Hz)");
|
||||
port_range_hints[FMOSC_FM].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_440;
|
||||
port_range_hints[FMOSC_FM].LowerBound = -0.25;
|
||||
port_range_hints[FMOSC_FM].UpperBound = 0.25;
|
||||
|
||||
/* Parameters for Output */
|
||||
port_descriptors[FMOSC_OUTPUT] =
|
||||
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
|
||||
port_names[FMOSC_OUTPUT] =
|
||||
D_("Output");
|
||||
port_range_hints[FMOSC_OUTPUT].HintDescriptor = 0;
|
||||
|
||||
fmOscDescriptor->activate = NULL;
|
||||
fmOscDescriptor->cleanup = cleanupFmOsc;
|
||||
fmOscDescriptor->connect_port = connectPortFmOsc;
|
||||
fmOscDescriptor->deactivate = NULL;
|
||||
fmOscDescriptor->instantiate = instantiateFmOsc;
|
||||
fmOscDescriptor->run = runFmOsc;
|
||||
fmOscDescriptor->run_adding = runAddingFmOsc;
|
||||
fmOscDescriptor->set_run_adding_gain = setRunAddingGainFmOsc;
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (fmOscDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)fmOscDescriptor->PortDescriptors);
|
||||
free((char **)fmOscDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)fmOscDescriptor->PortRangeHints);
|
||||
free(fmOscDescriptor);
|
||||
}
|
||||
fmOscDescriptor = NULL;
|
||||
|
||||
}
|
||||
@@ -88,7 +88,7 @@ static void connectPortFoldover(
|
||||
static LADSPA_Handle instantiateFoldover(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Foldover *plugin_data = (Foldover *)malloc(sizeof(Foldover));
|
||||
Foldover *plugin_data = (Foldover *)calloc(1, sizeof(Foldover));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -173,7 +173,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -255,12 +254,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (foldoverDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)foldoverDescriptor->PortDescriptors);
|
||||
free((char **)foldoverDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)foldoverDescriptor->PortRangeHints);
|
||||
free(foldoverDescriptor);
|
||||
}
|
||||
foldoverDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortFoverdrive(
|
||||
static LADSPA_Handle instantiateFoverdrive(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Foverdrive *plugin_data = (Foverdrive *)malloc(sizeof(Foverdrive));
|
||||
Foverdrive *plugin_data = (Foverdrive *)calloc(1, sizeof(Foverdrive));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -162,7 +162,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -234,12 +233,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (foverdriveDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)foverdriveDescriptor->PortDescriptors);
|
||||
free((char **)foverdriveDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)foverdriveDescriptor->PortRangeHints);
|
||||
free(foverdriveDescriptor);
|
||||
}
|
||||
foverdriveDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ static void connectPortFreqTracker(
|
||||
static LADSPA_Handle instantiateFreqTracker(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
FreqTracker *plugin_data = (FreqTracker *)malloc(sizeof(FreqTracker));
|
||||
FreqTracker *plugin_data = (FreqTracker *)calloc(1, sizeof(FreqTracker));
|
||||
int cross_time;
|
||||
LADSPA_Data f;
|
||||
LADSPA_Data fo;
|
||||
@@ -247,7 +247,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -319,12 +318,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (freqTrackerDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)freqTrackerDescriptor->PortDescriptors);
|
||||
free((char **)freqTrackerDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)freqTrackerDescriptor->PortRangeHints);
|
||||
free(freqTrackerDescriptor);
|
||||
}
|
||||
freqTrackerDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ static void connectPortGate(
|
||||
static LADSPA_Handle instantiateGate(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Gate *plugin_data = (Gate *)malloc(sizeof(Gate));
|
||||
Gate *plugin_data = (Gate *)calloc(1, sizeof(Gate));
|
||||
float env;
|
||||
float fs;
|
||||
float gate;
|
||||
@@ -440,7 +440,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -582,12 +581,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (gateDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)gateDescriptor->PortDescriptors);
|
||||
free((char **)gateDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)gateDescriptor->PortRangeHints);
|
||||
free(gateDescriptor);
|
||||
}
|
||||
gateDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ static void connectPortGiantFlange(
|
||||
static LADSPA_Handle instantiateGiantFlange(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
GiantFlange *plugin_data = (GiantFlange *)malloc(sizeof(GiantFlange));
|
||||
GiantFlange *plugin_data = (GiantFlange *)calloc(1, sizeof(GiantFlange));
|
||||
int16_t *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
unsigned int buffer_pos;
|
||||
@@ -508,7 +508,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -637,12 +636,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (giantFlangeDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)giantFlangeDescriptor->PortDescriptors);
|
||||
free((char **)giantFlangeDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)giantFlangeDescriptor->PortRangeHints);
|
||||
free(giantFlangeDescriptor);
|
||||
}
|
||||
giantFlangeDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ static void connectPortGong(
|
||||
static LADSPA_Handle instantiateGong(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Gong *plugin_data = (Gong *)malloc(sizeof(Gong));
|
||||
Gong *plugin_data = (Gong *)calloc(1, sizeof(Gong));
|
||||
int maxsize_i;
|
||||
int maxsize_o;
|
||||
float *out = NULL;
|
||||
@@ -615,7 +615,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -947,12 +946,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (gongDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)gongDescriptor->PortDescriptors);
|
||||
free((char **)gongDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)gongDescriptor->PortRangeHints);
|
||||
free(gongDescriptor);
|
||||
}
|
||||
gongDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ static void connectPortGongBeater(
|
||||
static LADSPA_Handle instantiateGongBeater(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
GongBeater *plugin_data = (GongBeater *)malloc(sizeof(GongBeater));
|
||||
GongBeater *plugin_data = (GongBeater *)calloc(1, sizeof(GongBeater));
|
||||
float fs;
|
||||
float imp_level;
|
||||
unsigned int running;
|
||||
@@ -308,7 +308,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -400,12 +399,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (gongBeaterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)gongBeaterDescriptor->PortDescriptors);
|
||||
free((char **)gongBeaterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)gongBeaterDescriptor->PortRangeHints);
|
||||
free(gongBeaterDescriptor);
|
||||
}
|
||||
gongBeaterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ static void connectPortGsm(
|
||||
static LADSPA_Handle instantiateGsm(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Gsm *plugin_data = (Gsm *)malloc(sizeof(Gsm));
|
||||
Gsm *plugin_data = (Gsm *)calloc(1, sizeof(Gsm));
|
||||
biquad *blf = NULL;
|
||||
int count;
|
||||
LADSPA_Data *dry = NULL;
|
||||
@@ -224,6 +224,7 @@ static void runGsm(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
int count = plugin_data->count;
|
||||
LADSPA_Data * dry = plugin_data->dry;
|
||||
gsm_signal * dst = plugin_data->dst;
|
||||
float fs = plugin_data->fs;
|
||||
gsm handle = plugin_data->handle;
|
||||
int resamp = plugin_data->resamp;
|
||||
float rsf = plugin_data->rsf;
|
||||
@@ -237,6 +238,8 @@ static void runGsm(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
int error_rate = f_round(error);
|
||||
int num_passes = f_round(passes);
|
||||
|
||||
fs = fs; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
|
||||
// oversample into buffer down to aprox 8kHz, 13bit
|
||||
@@ -319,6 +322,7 @@ static void runAddingGsm(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
int count = plugin_data->count;
|
||||
LADSPA_Data * dry = plugin_data->dry;
|
||||
gsm_signal * dst = plugin_data->dst;
|
||||
float fs = plugin_data->fs;
|
||||
gsm handle = plugin_data->handle;
|
||||
int resamp = plugin_data->resamp;
|
||||
float rsf = plugin_data->rsf;
|
||||
@@ -332,6 +336,8 @@ static void runAddingGsm(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
int error_rate = f_round(error);
|
||||
int num_passes = f_round(passes);
|
||||
|
||||
fs = fs; // So gcc doesn't think it's unused
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
|
||||
// oversample into buffer down to aprox 8kHz, 13bit
|
||||
@@ -388,7 +394,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -487,12 +492,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (gsmDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)gsmDescriptor->PortDescriptors);
|
||||
free((char **)gsmDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)gsmDescriptor->PortRangeHints);
|
||||
free(gsmDescriptor);
|
||||
}
|
||||
gsmDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ static void connectPortGverb(
|
||||
static LADSPA_Handle instantiateGverb(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Gverb *plugin_data = (Gverb *)malloc(sizeof(Gverb));
|
||||
Gverb *plugin_data = (Gverb *)calloc(1, sizeof(Gverb));
|
||||
ty_gverb *verb = NULL;
|
||||
|
||||
#line 50 "gverb_1216.xml"
|
||||
@@ -290,7 +290,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -429,12 +428,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (gverbDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)gverbDescriptor->PortDescriptors);
|
||||
free((char **)gverbDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)gverbDescriptor->PortRangeHints);
|
||||
free(gverbDescriptor);
|
||||
}
|
||||
gverbDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ static void connectPortHardLimiter(
|
||||
static LADSPA_Handle instantiateHardLimiter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
HardLimiter *plugin_data = (HardLimiter *)malloc(sizeof(HardLimiter));
|
||||
HardLimiter *plugin_data = (HardLimiter *)calloc(1, sizeof(HardLimiter));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -194,7 +194,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -286,12 +285,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (hardLimiterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)hardLimiterDescriptor->PortDescriptors);
|
||||
free((char **)hardLimiterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)hardLimiterDescriptor->PortRangeHints);
|
||||
free(hardLimiterDescriptor);
|
||||
}
|
||||
hardLimiterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ static void connectPortHarmonicGen(
|
||||
static LADSPA_Handle instantiateHarmonicGen(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
HarmonicGen *plugin_data = (HarmonicGen *)malloc(sizeof(HarmonicGen));
|
||||
HarmonicGen *plugin_data = (HarmonicGen *)calloc(1, sizeof(HarmonicGen));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -374,7 +374,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -542,12 +541,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (harmonicGenDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)harmonicGenDescriptor->PortDescriptors);
|
||||
free((char **)harmonicGenDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)harmonicGenDescriptor->PortRangeHints);
|
||||
free(harmonicGenDescriptor);
|
||||
}
|
||||
harmonicGenDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ inline void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
|
||||
|
||||
/* Run one sample through the SV filter. Filter is by andy@vellocet */
|
||||
|
||||
static inline float run_svf(sv_filter *sv, float in) {
|
||||
inline float run_svf(sv_filter *sv, float in) {
|
||||
float out;
|
||||
int i;
|
||||
|
||||
@@ -144,7 +144,7 @@ static inline float run_svf(sv_filter *sv, float in) {
|
||||
return out;
|
||||
}
|
||||
|
||||
static inline int wave_tbl(const float wave) {
|
||||
inline int wave_tbl(const float wave) {
|
||||
switch (f_round(wave)) {
|
||||
case 0:
|
||||
return BLO_SINE;
|
||||
@@ -569,7 +569,7 @@ static void connectPortHermesFilter(
|
||||
static LADSPA_Handle instantiateHermesFilter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
HermesFilter *plugin_data = (HermesFilter *)malloc(sizeof(HermesFilter));
|
||||
HermesFilter *plugin_data = (HermesFilter *)calloc(1, sizeof(HermesFilter));
|
||||
long count;
|
||||
float **dela_data = NULL;
|
||||
int *dela_pos = NULL;
|
||||
@@ -817,6 +817,7 @@ static void runHermesFilter(LADSPA_Handle instance, unsigned long sample_count)
|
||||
float lfo2_phase = plugin_data->lfo2_phase;
|
||||
blo_h_osc * osc1_d = plugin_data->osc1_d;
|
||||
blo_h_osc * osc2_d = plugin_data->osc2_d;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
sv_filter * xover_b1_data = plugin_data->xover_b1_data;
|
||||
sv_filter * xover_b2_data = plugin_data->xover_b2_data;
|
||||
|
||||
@@ -926,6 +927,8 @@ static void runHermesFilter(LADSPA_Handle instance, unsigned long sample_count)
|
||||
dela_fb[1] = dela2_fb;
|
||||
dela_fb[2] = dela3_fb;
|
||||
|
||||
tables = tables; // To shut up gcc
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
count++; // Count of number of samples processed
|
||||
|
||||
@@ -1201,6 +1204,7 @@ static void runAddingHermesFilter(LADSPA_Handle instance, unsigned long sample_c
|
||||
float lfo2_phase = plugin_data->lfo2_phase;
|
||||
blo_h_osc * osc1_d = plugin_data->osc1_d;
|
||||
blo_h_osc * osc2_d = plugin_data->osc2_d;
|
||||
blo_h_tables * tables = plugin_data->tables;
|
||||
sv_filter * xover_b1_data = plugin_data->xover_b1_data;
|
||||
sv_filter * xover_b2_data = plugin_data->xover_b2_data;
|
||||
|
||||
@@ -1310,6 +1314,8 @@ static void runAddingHermesFilter(LADSPA_Handle instance, unsigned long sample_c
|
||||
dela_fb[1] = dela2_fb;
|
||||
dela_fb[2] = dela3_fb;
|
||||
|
||||
tables = tables; // To shut up gcc
|
||||
|
||||
for (pos = 0; pos < sample_count; pos++) {
|
||||
count++; // Count of number of samples processed
|
||||
|
||||
@@ -1404,7 +1410,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -1992,12 +1997,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (hermesFilterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)hermesFilterDescriptor->PortDescriptors);
|
||||
free((char **)hermesFilterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)hermesFilterDescriptor->PortRangeHints);
|
||||
free(hermesFilterDescriptor);
|
||||
}
|
||||
hermesFilterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "highpass_iir_1890.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -69,6 +70,7 @@ static void activateHighpass_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 35 "highpass_iir_1890.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_HIGHPASS,10,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -80,6 +82,7 @@ static void activateHighpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupHighpass_iir(LADSPA_Handle instance) {
|
||||
#line 41 "highpass_iir_1890.xml"
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -112,11 +115,12 @@ static void connectPortHighpass_iir(
|
||||
static LADSPA_Handle instantiateHighpass_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)malloc(sizeof(Highpass_iir));
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)calloc(1, sizeof(Highpass_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 24 "highpass_iir_1890.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -136,6 +140,7 @@ static LADSPA_Handle instantiateHighpass_iir(
|
||||
|
||||
static void runHighpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -152,8 +157,12 @@ static void runHighpass_iir(LADSPA_Handle instance, unsigned long sample_count)
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 27 "highpass_iir_1890.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -169,6 +178,7 @@ static void setRunAddingGainHighpass_iir(LADSPA_Handle instance, LADSPA_Data gai
|
||||
|
||||
static void runAddingHighpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Highpass_iir *plugin_data = (Highpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -185,8 +195,12 @@ static void runAddingHighpass_iir(LADSPA_Handle instance, unsigned long sample_c
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 27 "highpass_iir_1890.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -196,7 +210,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -278,12 +291,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (highpass_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)highpass_iirDescriptor->PortDescriptors);
|
||||
free((char **)highpass_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)highpass_iirDescriptor->PortRangeHints);
|
||||
free(highpass_iirDescriptor);
|
||||
}
|
||||
highpass_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ static void connectPortHilbert(
|
||||
static LADSPA_Handle instantiateHilbert(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Hilbert *plugin_data = (Hilbert *)malloc(sizeof(Hilbert));
|
||||
Hilbert *plugin_data = (Hilbert *)calloc(1, sizeof(Hilbert));
|
||||
LADSPA_Data *delay = NULL;
|
||||
unsigned int dptr;
|
||||
|
||||
@@ -240,7 +240,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -316,12 +315,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (hilbertDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)hilbertDescriptor->PortDescriptors);
|
||||
free((char **)hilbertDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)hilbertDescriptor->PortRangeHints);
|
||||
free(hilbertDescriptor);
|
||||
}
|
||||
hilbertDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ typedef rfftw_plan fft_plan;
|
||||
|
||||
#define MK_IMP(i) impulse2freq(c, i, IMP_LENGTH(i), impulse_freq[c]); c++
|
||||
|
||||
static inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out);
|
||||
inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out);
|
||||
|
||||
#include "impulses/all.h"
|
||||
|
||||
@@ -77,7 +77,7 @@ unsigned int fft_length[IMPULSES];
|
||||
#ifdef __clang__
|
||||
void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
|
||||
#else
|
||||
static inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
|
||||
inline void impulse2freq(int id, float *imp, unsigned int length, fftw_real *out)
|
||||
#endif
|
||||
{
|
||||
fftw_real impulse_time[MAX_FFT_LENGTH];
|
||||
@@ -103,7 +103,7 @@ static inline void impulse2freq(int id, float *imp, unsigned int length, fftw_re
|
||||
for (i=0; i<length; i++) {
|
||||
impulse_time[i] = imp[i];
|
||||
}
|
||||
|
||||
|
||||
int last = i;
|
||||
for (i = 0; i<fftl; i++) {
|
||||
if (i >=last) impulse_time[i] = 0.0f;
|
||||
@@ -172,7 +172,7 @@ static void activateImp(LADSPA_Handle instance) {
|
||||
LADSPA_Data *opc = plugin_data->opc;
|
||||
unsigned long out_ptr = plugin_data->out_ptr;
|
||||
LADSPA_Data *overlap = plugin_data->overlap;
|
||||
#line 161 "imp_1199.xml"
|
||||
#line 167 "imp_1199.xml"
|
||||
memset(block_time, 0, MAX_FFT_LENGTH * sizeof(fftw_real));
|
||||
memset(block_freq, 0, MAX_FFT_LENGTH * sizeof(fftw_real));
|
||||
memset(op, 0, MAX_FFT_LENGTH * sizeof(fftw_real));
|
||||
@@ -195,7 +195,7 @@ static void activateImp(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupImp(LADSPA_Handle instance) {
|
||||
#line 173 "imp_1199.xml"
|
||||
#line 179 "imp_1199.xml"
|
||||
Imp *plugin_data = (Imp *)instance;
|
||||
local_free(plugin_data->block_time);
|
||||
local_free(plugin_data->block_freq);
|
||||
@@ -242,7 +242,7 @@ static void connectPortImp(
|
||||
static LADSPA_Handle instantiateImp(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Imp *plugin_data = (Imp *)malloc(sizeof(Imp));
|
||||
Imp *plugin_data = (Imp *)calloc(1, sizeof(Imp));
|
||||
fftw_real *block_freq = NULL;
|
||||
fftw_real *block_time = NULL;
|
||||
unsigned int count;
|
||||
@@ -253,7 +253,7 @@ static LADSPA_Handle instantiateImp(
|
||||
unsigned long out_ptr;
|
||||
LADSPA_Data *overlap = NULL;
|
||||
|
||||
#line 135 "imp_1199.xml"
|
||||
#line 141 "imp_1199.xml"
|
||||
unsigned int i;
|
||||
|
||||
impulse_freq = local_malloc(IMPULSES * sizeof(fftw_real *));
|
||||
@@ -326,7 +326,7 @@ static void runImp(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned long out_ptr = plugin_data->out_ptr;
|
||||
LADSPA_Data * overlap = plugin_data->overlap;
|
||||
|
||||
#line 181 "imp_1199.xml"
|
||||
#line 192 "imp_1199.xml"
|
||||
unsigned long i, pos, ipos, limit;
|
||||
unsigned int im;
|
||||
unsigned int len;
|
||||
@@ -448,7 +448,7 @@ static void runAddingImp(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned long out_ptr = plugin_data->out_ptr;
|
||||
LADSPA_Data * overlap = plugin_data->overlap;
|
||||
|
||||
#line 181 "imp_1199.xml"
|
||||
#line 192 "imp_1199.xml"
|
||||
unsigned long i, pos, ipos, limit;
|
||||
unsigned int im;
|
||||
unsigned int len;
|
||||
@@ -538,7 +538,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -637,12 +636,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (impDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)impDescriptor->PortDescriptors);
|
||||
free((char **)impDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)impDescriptor->PortRangeHints);
|
||||
free(impDescriptor);
|
||||
}
|
||||
impDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ static void connectPortImpulse_fc(
|
||||
static LADSPA_Handle instantiateImpulse_fc(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Impulse_fc *plugin_data = (Impulse_fc *)malloc(sizeof(Impulse_fc));
|
||||
Impulse_fc *plugin_data = (Impulse_fc *)calloc(1, sizeof(Impulse_fc));
|
||||
float phase;
|
||||
LADSPA_Data sample_rate;
|
||||
|
||||
@@ -193,7 +193,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -257,12 +256,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (impulse_fcDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)impulse_fcDescriptor->PortDescriptors);
|
||||
free((char **)impulse_fcDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)impulse_fcDescriptor->PortRangeHints);
|
||||
free(impulse_fcDescriptor);
|
||||
}
|
||||
impulse_fcDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ static void connectPortInv(
|
||||
static LADSPA_Handle instantiateInv(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Inv *plugin_data = (Inv *)malloc(sizeof(Inv));
|
||||
Inv *plugin_data = (Inv *)calloc(1, sizeof(Inv));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -145,7 +145,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -207,12 +206,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (invDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)invDescriptor->PortDescriptors);
|
||||
free((char **)invDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)invDescriptor->PortRangeHints);
|
||||
free(invDescriptor);
|
||||
}
|
||||
invDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static void connectPortKaraoke(
|
||||
static LADSPA_Handle instantiateKaraoke(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Karaoke *plugin_data = (Karaoke *)malloc(sizeof(Karaoke));
|
||||
Karaoke *plugin_data = (Karaoke *)calloc(1, sizeof(Karaoke));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -188,7 +188,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -274,12 +273,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (karaokeDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)karaokeDescriptor->PortDescriptors);
|
||||
free((char **)karaokeDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)karaokeDescriptor->PortRangeHints);
|
||||
free(karaokeDescriptor);
|
||||
}
|
||||
karaokeDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static void connectPortArtificialLatency(
|
||||
static LADSPA_Handle instantiateArtificialLatency(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
ArtificialLatency *plugin_data = (ArtificialLatency *)malloc(sizeof(ArtificialLatency));
|
||||
ArtificialLatency *plugin_data = (ArtificialLatency *)calloc(1, sizeof(ArtificialLatency));
|
||||
float fs;
|
||||
|
||||
#line 21 "latency_1914.xml"
|
||||
@@ -180,7 +180,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -259,12 +258,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (artificialLatencyDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)artificialLatencyDescriptor->PortDescriptors);
|
||||
free((char **)artificialLatencyDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)artificialLatencyDescriptor->PortRangeHints);
|
||||
free(artificialLatencyDescriptor);
|
||||
}
|
||||
artificialLatencyDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ static void connectPortLcrDelay(
|
||||
static LADSPA_Handle instantiateLcrDelay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
LcrDelay *plugin_data = (LcrDelay *)malloc(sizeof(LcrDelay));
|
||||
LcrDelay *plugin_data = (LcrDelay *)calloc(1, sizeof(LcrDelay));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
unsigned int buffer_pos;
|
||||
@@ -547,7 +547,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -733,12 +732,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (lcrDelayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)lcrDelayDescriptor->PortDescriptors);
|
||||
free((char **)lcrDelayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)lcrDelayDescriptor->PortRangeHints);
|
||||
free(lcrDelayDescriptor);
|
||||
}
|
||||
lcrDelayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "lowpass_iir_1891.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -70,6 +71,7 @@ static void activateLowpass_iir(LADSPA_Handle instance) {
|
||||
iir_stage_t*gt = plugin_data->gt;
|
||||
iirf_t*iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
#line 36 "lowpass_iir_1891.xml"
|
||||
|
||||
gt = init_iir_stage(IIR_STAGE_LOWPASS,10,3,2);
|
||||
iirf = init_iirf_t(gt);
|
||||
@@ -82,6 +84,7 @@ static void activateLowpass_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupLowpass_iir(LADSPA_Handle instance) {
|
||||
#line 43 "lowpass_iir_1891.xml"
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf, plugin_data->gt);
|
||||
free_iir_stage(plugin_data->gt);
|
||||
@@ -114,11 +117,12 @@ static void connectPortLowpass_iir(
|
||||
static LADSPA_Handle instantiateLowpass_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)malloc(sizeof(Lowpass_iir));
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)calloc(1, sizeof(Lowpass_iir));
|
||||
iir_stage_t*gt = NULL;
|
||||
iirf_t*iirf = NULL;
|
||||
long sample_rate;
|
||||
|
||||
#line 25 "lowpass_iir_1891.xml"
|
||||
sample_rate = s_rate;
|
||||
|
||||
plugin_data->gt = gt;
|
||||
@@ -138,6 +142,7 @@ static LADSPA_Handle instantiateLowpass_iir(
|
||||
|
||||
static void runLowpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -154,8 +159,12 @@ static void runLowpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 28 "lowpass_iir_1891.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -171,6 +180,7 @@ static void setRunAddingGainLowpass_iir(LADSPA_Handle instance, LADSPA_Data gain
|
||||
|
||||
static void runAddingLowpass_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Lowpass_iir *plugin_data = (Lowpass_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Cutoff Frequency (float value) */
|
||||
const LADSPA_Data cutoff = *(plugin_data->cutoff);
|
||||
@@ -187,8 +197,12 @@ static void runAddingLowpass_iir(LADSPA_Handle instance, unsigned long sample_co
|
||||
iirf_t* iirf = plugin_data->iirf;
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
|
||||
#line 28 "lowpass_iir_1891.xml"
|
||||
chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, cutoff/(float)sample_rate, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf, gt, input, output, sample_count,RUN_ADDING);
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -198,7 +212,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -280,12 +293,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (lowpass_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)lowpass_iirDescriptor->PortDescriptors);
|
||||
free((char **)lowpass_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)lowpass_iirDescriptor->PortRangeHints);
|
||||
free(lowpass_iirDescriptor);
|
||||
}
|
||||
lowpass_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ static void connectPortLsFilter(
|
||||
static LADSPA_Handle instantiateLsFilter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
LsFilter *plugin_data = (LsFilter *)malloc(sizeof(LsFilter));
|
||||
LsFilter *plugin_data = (LsFilter *)calloc(1, sizeof(LsFilter));
|
||||
ls_filt *filt = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -216,7 +216,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -308,12 +307,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (lsFilterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)lsFilterDescriptor->PortDescriptors);
|
||||
free((char **)lsFilterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)lsFilterDescriptor->PortRangeHints);
|
||||
free(lsFilterDescriptor);
|
||||
}
|
||||
lsFilterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static void connectPortMatrixMSSt(
|
||||
static LADSPA_Handle instantiateMatrixMSSt(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
MatrixMSSt *plugin_data = (MatrixMSSt *)malloc(sizeof(MatrixMSSt));
|
||||
MatrixMSSt *plugin_data = (MatrixMSSt *)calloc(1, sizeof(MatrixMSSt));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -180,7 +180,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -266,12 +265,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (matrixMSStDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)matrixMSStDescriptor->PortDescriptors);
|
||||
free((char **)matrixMSStDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)matrixMSStDescriptor->PortRangeHints);
|
||||
free(matrixMSStDescriptor);
|
||||
}
|
||||
matrixMSStDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ static void connectPortMatrixSpatialiser(
|
||||
static LADSPA_Handle instantiateMatrixSpatialiser(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
MatrixSpatialiser *plugin_data = (MatrixSpatialiser *)malloc(sizeof(MatrixSpatialiser));
|
||||
MatrixSpatialiser *plugin_data = (MatrixSpatialiser *)calloc(1, sizeof(MatrixSpatialiser));
|
||||
LADSPA_Data current_m_gain;
|
||||
LADSPA_Data current_s_gain;
|
||||
|
||||
@@ -338,7 +338,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -424,12 +423,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (matrixSpatialiserDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)matrixSpatialiserDescriptor->PortDescriptors);
|
||||
free((char **)matrixSpatialiserDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)matrixSpatialiserDescriptor->PortRangeHints);
|
||||
free(matrixSpatialiserDescriptor);
|
||||
}
|
||||
matrixSpatialiserDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ static void connectPortMatrixStMS(
|
||||
static LADSPA_Handle instantiateMatrixStMS(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
MatrixStMS *plugin_data = (MatrixStMS *)malloc(sizeof(MatrixStMS));
|
||||
MatrixStMS *plugin_data = (MatrixStMS *)calloc(1, sizeof(MatrixStMS));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -169,7 +169,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -245,12 +244,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (matrixStMSDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)matrixStMSDescriptor->PortDescriptors);
|
||||
free((char **)matrixStMSDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)matrixStMSDescriptor->PortRangeHints);
|
||||
free(matrixStMSDescriptor);
|
||||
}
|
||||
matrixStMSDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ static void connectPortMbeq(
|
||||
static LADSPA_Handle instantiateMbeq(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Mbeq *plugin_data = (Mbeq *)malloc(sizeof(Mbeq));
|
||||
Mbeq *plugin_data = (Mbeq *)calloc(1, sizeof(Mbeq));
|
||||
int *bin_base = NULL;
|
||||
float *bin_delta = NULL;
|
||||
fftw_real *comp = NULL;
|
||||
@@ -286,10 +286,11 @@ static LADSPA_Handle instantiateMbeq(
|
||||
|
||||
// Create raised cosine window table
|
||||
for (i=0; i < FFT_LENGTH; i++) {
|
||||
window[i] = -0.5f * cos(2.0f*M_PI*(double)i/(double)FFT_LENGTH) + 0.5f;
|
||||
window[i] = -0.5f*cos(2.0f*M_PI*(double)i/(double)FFT_LENGTH)+0.5f;
|
||||
window[i] *= 2.0f;
|
||||
}
|
||||
|
||||
// Create db->coefficient lookup table
|
||||
// Create db->coeffiecnt lookup table
|
||||
db_table = malloc(1000 * sizeof(float));
|
||||
for (i=0; i < 1000; i++) {
|
||||
db = ((float)i/10) - 70;
|
||||
@@ -471,12 +472,8 @@ static void runMbeq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
// Window into the output accumulator
|
||||
for (i = 0; i < FFT_LENGTH; i++) {
|
||||
// correction factor for window measured from white noise
|
||||
// reduce intermediate output by (number of coefficients) * OVER_SAMP
|
||||
out_accum[i] += real[i] * window[i] * 1.27519f /
|
||||
((FFT_LENGTH/2) * OVER_SAMP);
|
||||
out_accum[i] += 0.9186162f * window[i] * real[i]/(FFT_LENGTH * OVER_SAMP);
|
||||
}
|
||||
|
||||
for (i = 0; i < step_size; i++) {
|
||||
out_fifo[i] = out_accum[i];
|
||||
}
|
||||
@@ -669,7 +666,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -888,12 +884,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (mbeqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)mbeqDescriptor->PortDescriptors);
|
||||
free((char **)mbeqDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)mbeqDescriptor->PortRangeHints);
|
||||
free(mbeqDescriptor);
|
||||
}
|
||||
mbeqDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ static void connectPortModDelay(
|
||||
static LADSPA_Handle instantiateModDelay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
ModDelay *plugin_data = (ModDelay *)malloc(sizeof(ModDelay));
|
||||
ModDelay *plugin_data = (ModDelay *)calloc(1, sizeof(ModDelay));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
float fs;
|
||||
@@ -236,7 +236,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -318,12 +317,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (modDelayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)modDelayDescriptor->PortDescriptors);
|
||||
free((char **)modDelayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)modDelayDescriptor->PortRangeHints);
|
||||
free(modDelayDescriptor);
|
||||
}
|
||||
modDelayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ static void connectPortMultivoiceChorus(
|
||||
static LADSPA_Handle instantiateMultivoiceChorus(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
MultivoiceChorus *plugin_data = (MultivoiceChorus *)malloc(sizeof(MultivoiceChorus));
|
||||
MultivoiceChorus *plugin_data = (MultivoiceChorus *)calloc(1, sizeof(MultivoiceChorus));
|
||||
long count;
|
||||
unsigned int delay_mask;
|
||||
unsigned int delay_pos;
|
||||
@@ -534,7 +534,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -656,12 +655,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (multivoiceChorusDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)multivoiceChorusDescriptor->PortDescriptors);
|
||||
free((char **)multivoiceChorusDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)multivoiceChorusDescriptor->PortRangeHints);
|
||||
free(multivoiceChorusDescriptor);
|
||||
}
|
||||
multivoiceChorusDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 9 "notch_iir_1894.xml"
|
||||
|
||||
#include "config.h"
|
||||
#include "util/iir.h"
|
||||
@@ -79,6 +80,7 @@ static void activateNotch_iir(LADSPA_Handle instance) {
|
||||
long sample_rate = plugin_data->sample_rate;
|
||||
iir_stage_t*second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
#line 39 "notch_iir_1894.xml"
|
||||
|
||||
ufc = (*(plugin_data->center) - *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
lfc = (*(plugin_data->center) + *(plugin_data->width)*0.5f)/(float)sample_rate;
|
||||
@@ -99,6 +101,7 @@ static void activateNotch_iir(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupNotch_iir(LADSPA_Handle instance) {
|
||||
#line 50 "notch_iir_1894.xml"
|
||||
Notch_iir *plugin_data = (Notch_iir *)instance;
|
||||
free_iirf_t(plugin_data->iirf1, plugin_data->first);
|
||||
free_iirf_t(plugin_data->iirf2, plugin_data->second);
|
||||
@@ -136,7 +139,7 @@ static void connectPortNotch_iir(
|
||||
static LADSPA_Handle instantiateNotch_iir(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Notch_iir *plugin_data = (Notch_iir *)malloc(sizeof(Notch_iir));
|
||||
Notch_iir *plugin_data = (Notch_iir *)calloc(1, sizeof(Notch_iir));
|
||||
iir_stage_t*first = NULL;
|
||||
iirf_t*iirf1 = NULL;
|
||||
iirf_t*iirf2 = NULL;
|
||||
@@ -145,6 +148,7 @@ static LADSPA_Handle instantiateNotch_iir(
|
||||
iir_stage_t*second = NULL;
|
||||
float ufc;
|
||||
|
||||
#line 23 "notch_iir_1894.xml"
|
||||
sample_rate = s_rate;
|
||||
ufc = lfc = 0.0f;
|
||||
|
||||
@@ -169,6 +173,7 @@ static LADSPA_Handle instantiateNotch_iir(
|
||||
|
||||
static void runNotch_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Notch_iir *plugin_data = (Notch_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -192,12 +197,16 @@ static void runNotch_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "notch_iir_1894.xml"
|
||||
ufc = (center - width*0.5f)/(float)sample_rate;
|
||||
lfc = (center + width*0.5f)/(float)sample_rate;
|
||||
chebyshev(iirf1, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f);
|
||||
chebyshev(iirf2, second, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, lfc, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf1, first, input, output, sample_count, RUN_ADDING);
|
||||
iir_process_buffer_ns_5(iirf2, second, input, output, sample_count, 1); /* add to first buffer */
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
#undef buffer_write
|
||||
#undef RUN_ADDING
|
||||
@@ -213,6 +222,7 @@ static void setRunAddingGainNotch_iir(LADSPA_Handle instance, LADSPA_Data gain)
|
||||
|
||||
static void runAddingNotch_iir(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
Notch_iir *plugin_data = (Notch_iir *)instance;
|
||||
LADSPA_Data run_adding_gain = plugin_data->run_adding_gain;
|
||||
|
||||
/* Center Frequency (Hz) (float value) */
|
||||
const LADSPA_Data center = *(plugin_data->center);
|
||||
@@ -236,12 +246,16 @@ static void runAddingNotch_iir(LADSPA_Handle instance, unsigned long sample_coun
|
||||
iir_stage_t* second = plugin_data->second;
|
||||
float ufc = plugin_data->ufc;
|
||||
|
||||
#line 27 "notch_iir_1894.xml"
|
||||
ufc = (center - width*0.5f)/(float)sample_rate;
|
||||
lfc = (center + width*0.5f)/(float)sample_rate;
|
||||
chebyshev(iirf1, first, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, ufc, 0.5f);
|
||||
chebyshev(iirf2, second, 2*CLAMP((int)stages,1,10), IIR_STAGE_HIGHPASS, lfc, 0.5f);
|
||||
iir_process_buffer_ns_5(iirf1, first, input, output, sample_count, RUN_ADDING);
|
||||
iir_process_buffer_ns_5(iirf2, second, input, output, sample_count, 1); /* add to first buffer */
|
||||
|
||||
// Unused variable
|
||||
(void)(run_adding_gain);
|
||||
}
|
||||
|
||||
void __attribute__((constructor)) swh_init() {
|
||||
@@ -251,7 +265,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -343,12 +356,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (notch_iirDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)notch_iirDescriptor->PortDescriptors);
|
||||
free((char **)notch_iirDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)notch_iirDescriptor->PortRangeHints);
|
||||
free(notch_iirDescriptor);
|
||||
}
|
||||
notch_iirDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ static void connectPortLfoPhaser(
|
||||
static LADSPA_Handle instantiateLfoPhaser(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
LfoPhaser *plugin_data = (LfoPhaser *)malloc(sizeof(LfoPhaser));
|
||||
LfoPhaser *plugin_data = (LfoPhaser *)calloc(1, sizeof(LfoPhaser));
|
||||
allpass *ap = NULL;
|
||||
int count;
|
||||
float f_per_lv;
|
||||
@@ -551,7 +551,7 @@ static void connectPortFourByFourPole(
|
||||
static LADSPA_Handle instantiateFourByFourPole(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
FourByFourPole *plugin_data = (FourByFourPole *)malloc(sizeof(FourByFourPole));
|
||||
FourByFourPole *plugin_data = (FourByFourPole *)calloc(1, sizeof(FourByFourPole));
|
||||
allpass *ap = NULL;
|
||||
float sr_r_2;
|
||||
float y0;
|
||||
@@ -838,7 +838,7 @@ static void connectPortAutoPhaser(
|
||||
static LADSPA_Handle instantiateAutoPhaser(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
AutoPhaser *plugin_data = (AutoPhaser *)malloc(sizeof(AutoPhaser));
|
||||
AutoPhaser *plugin_data = (AutoPhaser *)calloc(1, sizeof(AutoPhaser));
|
||||
allpass *ap = NULL;
|
||||
envelope *env = NULL;
|
||||
float sample_rate;
|
||||
@@ -1037,7 +1037,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -1377,24 +1376,27 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (lfoPhaserDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)lfoPhaserDescriptor->PortDescriptors);
|
||||
free((char **)lfoPhaserDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)lfoPhaserDescriptor->PortRangeHints);
|
||||
free(lfoPhaserDescriptor);
|
||||
}
|
||||
lfoPhaserDescriptor = NULL;
|
||||
if (fourByFourPoleDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)fourByFourPoleDescriptor->PortDescriptors);
|
||||
free((char **)fourByFourPoleDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)fourByFourPoleDescriptor->PortRangeHints);
|
||||
free(fourByFourPoleDescriptor);
|
||||
}
|
||||
fourByFourPoleDescriptor = NULL;
|
||||
if (autoPhaserDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)autoPhaserDescriptor->PortDescriptors);
|
||||
free((char **)autoPhaserDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)autoPhaserDescriptor->PortRangeHints);
|
||||
free(autoPhaserDescriptor);
|
||||
}
|
||||
autoPhaserDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ static void activatePitchScale(LADSPA_Handle instance) {
|
||||
memset(buffers->gAnaFreq, 0, FRAME_LENGTH*sizeof(float));
|
||||
memset(buffers->gAnaMagn, 0, FRAME_LENGTH*sizeof(float));
|
||||
buffers->gRover = 0;
|
||||
sample_rate = sample_rate;
|
||||
|
||||
/* do one run to make sure the plans are set up */
|
||||
pitch_scale(buffers, 1.0, FRAME_LENGTH, 4, FRAME_LENGTH, sample_rate, buffers->gInFIFO, buffers->gOutFIFO, 0, 0.0f);
|
||||
@@ -130,7 +131,7 @@ static void connectPortPitchScale(
|
||||
static LADSPA_Handle instantiatePitchScale(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
PitchScale *plugin_data = (PitchScale *)malloc(sizeof(PitchScale));
|
||||
PitchScale *plugin_data = (PitchScale *)calloc(1, sizeof(PitchScale));
|
||||
sbuffers *buffers = NULL;
|
||||
long sample_rate;
|
||||
|
||||
@@ -247,7 +248,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -326,12 +326,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (pitchScaleDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)pitchScaleDescriptor->PortDescriptors);
|
||||
free((char **)pitchScaleDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)pitchScaleDescriptor->PortRangeHints);
|
||||
free(pitchScaleDescriptor);
|
||||
}
|
||||
pitchScaleDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ static void connectPortPitchScaleHQ(
|
||||
static LADSPA_Handle instantiatePitchScaleHQ(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
PitchScaleHQ *plugin_data = (PitchScaleHQ *)malloc(sizeof(PitchScaleHQ));
|
||||
PitchScaleHQ *plugin_data = (PitchScaleHQ *)calloc(1, sizeof(PitchScaleHQ));
|
||||
sbuffers *buffers = NULL;
|
||||
long sample_rate;
|
||||
|
||||
@@ -232,7 +232,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -311,12 +310,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (pitchScaleHQDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)pitchScaleHQDescriptor->PortDescriptors);
|
||||
free((char **)pitchScaleHQDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)pitchScaleHQDescriptor->PortRangeHints);
|
||||
free(pitchScaleHQDescriptor);
|
||||
}
|
||||
pitchScaleHQDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ static void connectPortPlate(
|
||||
static LADSPA_Handle instantiatePlate(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Plate *plugin_data = (Plate *)malloc(sizeof(Plate));
|
||||
Plate *plugin_data = (Plate *)calloc(1, sizeof(Plate));
|
||||
float *out = NULL;
|
||||
waveguide_nl **w = NULL;
|
||||
|
||||
@@ -302,7 +302,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -401,12 +400,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (plateDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)plateDescriptor->PortDescriptors);
|
||||
free((char **)plateDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)plateDescriptor->PortRangeHints);
|
||||
free(plateDescriptor);
|
||||
}
|
||||
plateDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ static void connectPortPointerCastDistortion(
|
||||
static LADSPA_Handle instantiatePointerCastDistortion(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
PointerCastDistortion *plugin_data = (PointerCastDistortion *)malloc(sizeof(PointerCastDistortion));
|
||||
PointerCastDistortion *plugin_data = (PointerCastDistortion *)calloc(1, sizeof(PointerCastDistortion));
|
||||
biquad *filt = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -228,7 +228,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -310,12 +309,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (pointerCastDistortionDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)pointerCastDistortionDescriptor->PortDescriptors);
|
||||
free((char **)pointerCastDistortionDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)pointerCastDistortionDescriptor->PortRangeHints);
|
||||
free(pointerCastDistortionDescriptor);
|
||||
}
|
||||
pointerCastDistortionDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ static void connectPortRateShifter(
|
||||
static LADSPA_Handle instantiateRateShifter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
RateShifter *plugin_data = (RateShifter *)malloc(sizeof(RateShifter));
|
||||
RateShifter *plugin_data = (RateShifter *)calloc(1, sizeof(RateShifter));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
fixp32 read_ptr;
|
||||
@@ -242,7 +242,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -314,12 +313,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (rateShifterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)rateShifterDescriptor->PortDescriptors);
|
||||
free((char **)rateShifterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)rateShifterDescriptor->PortRangeHints);
|
||||
free(rateShifterDescriptor);
|
||||
}
|
||||
rateShifterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
|
||||
#define BASE_BUFFER 0.001 // Base buffer length (s)
|
||||
|
||||
static inline LADSPA_Data sat(LADSPA_Data x, float q, float dist) {
|
||||
inline LADSPA_Data sat(LADSPA_Data x, float q, float dist) {
|
||||
if (x == q) {
|
||||
return 1.0f / dist + q / (1.0f - f_exp(dist * q));
|
||||
}
|
||||
@@ -178,7 +178,7 @@ static void connectPortRetroFlange(
|
||||
static LADSPA_Handle instantiateRetroFlange(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
RetroFlange *plugin_data = (RetroFlange *)malloc(sizeof(RetroFlange));
|
||||
RetroFlange *plugin_data = (RetroFlange *)calloc(1, sizeof(RetroFlange));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
long buffer_size;
|
||||
long count;
|
||||
@@ -499,7 +499,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -581,12 +580,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (retroFlangeDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)retroFlangeDescriptor->PortDescriptors);
|
||||
free((char **)retroFlangeDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)retroFlangeDescriptor->PortRangeHints);
|
||||
free(retroFlangeDescriptor);
|
||||
}
|
||||
retroFlangeDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
#define _WINDOWS_DLL_EXPORT_
|
||||
#endif
|
||||
|
||||
#line 10 "revdelay_1605.xml"
|
||||
|
||||
#include "ladspa-util.h"
|
||||
#include <stdio.h>
|
||||
@@ -85,6 +86,7 @@ static void activateRevdelay(LADSPA_Handle instance) {
|
||||
LADSPA_Data last_delay_time = plugin_data->last_delay_time;
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
#line 38 "revdelay_1605.xml"
|
||||
unsigned int size;
|
||||
|
||||
size = sample_rate * 5 * 2; /* 5 second maximum */
|
||||
@@ -105,6 +107,7 @@ static void activateRevdelay(LADSPA_Handle instance) {
|
||||
}
|
||||
|
||||
static void cleanupRevdelay(LADSPA_Handle instance) {
|
||||
#line 51 "revdelay_1605.xml"
|
||||
Revdelay *plugin_data = (Revdelay *)instance;
|
||||
free(plugin_data->buffer);
|
||||
free(instance);
|
||||
@@ -145,7 +148,7 @@ static void connectPortRevdelay(
|
||||
static LADSPA_Handle instantiateRevdelay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Revdelay *plugin_data = (Revdelay *)malloc(sizeof(Revdelay));
|
||||
Revdelay *plugin_data = (Revdelay *)calloc(1, sizeof(Revdelay));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_size;
|
||||
LADSPA_Data delay_samples;
|
||||
@@ -153,6 +156,7 @@ static LADSPA_Handle instantiateRevdelay(
|
||||
unsigned int sample_rate;
|
||||
long write_phase;
|
||||
|
||||
#line 30 "revdelay_1605.xml"
|
||||
sample_rate = s_rate;
|
||||
buffer_size = 0;
|
||||
delay_samples = 0;
|
||||
@@ -207,6 +211,7 @@ static void runRevdelay(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 55 "revdelay_1605.xml"
|
||||
int i;
|
||||
unsigned long delay2;
|
||||
float dry = DB_CO(dry_level);
|
||||
@@ -335,6 +340,7 @@ static void runAddingRevdelay(LADSPA_Handle instance, unsigned long sample_count
|
||||
unsigned int sample_rate = plugin_data->sample_rate;
|
||||
long write_phase = plugin_data->write_phase;
|
||||
|
||||
#line 55 "revdelay_1605.xml"
|
||||
int i;
|
||||
unsigned long delay2;
|
||||
float dry = DB_CO(dry_level);
|
||||
@@ -428,7 +434,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -540,12 +545,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (revdelayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)revdelayDescriptor->PortDescriptors);
|
||||
free((char **)revdelayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)revdelayDescriptor->PortRangeHints);
|
||||
free(revdelayDescriptor);
|
||||
}
|
||||
revdelayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ static void connectPortRingmod_2i1o(
|
||||
static LADSPA_Handle instantiateRingmod_2i1o(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Ringmod_2i1o *plugin_data = (Ringmod_2i1o *)malloc(sizeof(Ringmod_2i1o));
|
||||
Ringmod_2i1o *plugin_data = (Ringmod_2i1o *)calloc(1, sizeof(Ringmod_2i1o));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -207,6 +207,8 @@ static void activateRingmod_1i1o1l(LADSPA_Handle instance) {
|
||||
|
||||
static void cleanupRingmod_1i1o1l(LADSPA_Handle instance) {
|
||||
#line 93 "ringmod_1188.xml"
|
||||
Ringmod_1i1o1l *plugin_data = (Ringmod_1i1o1l *)instance;
|
||||
plugin_data = plugin_data;
|
||||
if (--refcount == 0) {
|
||||
free(sin_tbl);
|
||||
free(tri_tbl);
|
||||
@@ -254,7 +256,7 @@ static void connectPortRingmod_1i1o1l(
|
||||
static LADSPA_Handle instantiateRingmod_1i1o1l(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Ringmod_1i1o1l *plugin_data = (Ringmod_1i1o1l *)malloc(sizeof(Ringmod_1i1o1l));
|
||||
Ringmod_1i1o1l *plugin_data = (Ringmod_1i1o1l *)calloc(1, sizeof(Ringmod_1i1o1l));
|
||||
LADSPA_Data offset;
|
||||
|
||||
#line 59 "ringmod_1188.xml"
|
||||
@@ -434,7 +436,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -630,18 +631,20 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (ringmod_2i1oDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)ringmod_2i1oDescriptor->PortDescriptors);
|
||||
free((char **)ringmod_2i1oDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)ringmod_2i1oDescriptor->PortRangeHints);
|
||||
free(ringmod_2i1oDescriptor);
|
||||
}
|
||||
ringmod_2i1oDescriptor = NULL;
|
||||
if (ringmod_1i1o1lDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)ringmod_1i1o1lDescriptor->PortDescriptors);
|
||||
free((char **)ringmod_1i1o1lDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)ringmod_1i1o1lDescriptor->PortRangeHints);
|
||||
free(ringmod_1i1o1lDescriptor);
|
||||
}
|
||||
ringmod_1i1o1lDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ static void connectPortSatanMaximiser(
|
||||
static LADSPA_Handle instantiateSatanMaximiser(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SatanMaximiser *plugin_data = (SatanMaximiser *)malloc(sizeof(SatanMaximiser));
|
||||
SatanMaximiser *plugin_data = (SatanMaximiser *)calloc(1, sizeof(SatanMaximiser));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_pos;
|
||||
float env;
|
||||
@@ -262,7 +262,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -344,12 +343,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (satanMaximiserDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)satanMaximiserDescriptor->PortDescriptors);
|
||||
free((char **)satanMaximiserDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)satanMaximiserDescriptor->PortRangeHints);
|
||||
free(satanMaximiserDescriptor);
|
||||
}
|
||||
satanMaximiserDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ static void connectPortSc1(
|
||||
static LADSPA_Handle instantiateSc1(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sc1 *plugin_data = (Sc1 *)malloc(sizeof(Sc1));
|
||||
Sc1 *plugin_data = (Sc1 *)calloc(1, sizeof(Sc1));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -351,7 +351,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -473,12 +472,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sc1Descriptor) {
|
||||
free((LADSPA_PortDescriptor *)sc1Descriptor->PortDescriptors);
|
||||
free((char **)sc1Descriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sc1Descriptor->PortRangeHints);
|
||||
free(sc1Descriptor);
|
||||
}
|
||||
sc1Descriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ static void connectPortSc2(
|
||||
static LADSPA_Handle instantiateSc2(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sc2 *plugin_data = (Sc2 *)malloc(sizeof(Sc2));
|
||||
Sc2 *plugin_data = (Sc2 *)calloc(1, sizeof(Sc2));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -362,7 +362,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -491,12 +490,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sc2Descriptor) {
|
||||
free((LADSPA_PortDescriptor *)sc2Descriptor->PortDescriptors);
|
||||
free((char **)sc2Descriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sc2Descriptor->PortRangeHints);
|
||||
free(sc2Descriptor);
|
||||
}
|
||||
sc2Descriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ static void connectPortSc3(
|
||||
static LADSPA_Handle instantiateSc3(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sc3 *plugin_data = (Sc3 *)malloc(sizeof(Sc3));
|
||||
Sc3 *plugin_data = (Sc3 *)calloc(1, sizeof(Sc3));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -409,7 +409,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -562,12 +561,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sc3Descriptor) {
|
||||
free((LADSPA_PortDescriptor *)sc3Descriptor->PortDescriptors);
|
||||
free((char **)sc3Descriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sc3Descriptor->PortRangeHints);
|
||||
free(sc3Descriptor);
|
||||
}
|
||||
sc3Descriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ static void connectPortSc4(
|
||||
static LADSPA_Handle instantiateSc4(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sc4 *plugin_data = (Sc4 *)malloc(sizeof(Sc4));
|
||||
Sc4 *plugin_data = (Sc4 *)calloc(1, sizeof(Sc4));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -452,7 +452,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -618,12 +617,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sc4Descriptor) {
|
||||
free((LADSPA_PortDescriptor *)sc4Descriptor->PortDescriptors);
|
||||
free((char **)sc4Descriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sc4Descriptor->PortRangeHints);
|
||||
free(sc4Descriptor);
|
||||
}
|
||||
sc4Descriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ static void connectPortSc4m(
|
||||
static LADSPA_Handle instantiateSc4m(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sc4m *plugin_data = (Sc4m *)malloc(sizeof(Sc4m));
|
||||
Sc4m *plugin_data = (Sc4m *)calloc(1, sizeof(Sc4m));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -416,7 +416,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -568,12 +567,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sc4mDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)sc4mDescriptor->PortDescriptors);
|
||||
free((char **)sc4mDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sc4mDescriptor->PortRangeHints);
|
||||
free(sc4mDescriptor);
|
||||
}
|
||||
sc4mDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ static void connectPortSe4(
|
||||
static LADSPA_Handle instantiateSe4(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Se4 *plugin_data = (Se4 *)malloc(sizeof(Se4));
|
||||
Se4 *plugin_data = (Se4 *)calloc(1, sizeof(Se4));
|
||||
float amp;
|
||||
float *as = NULL;
|
||||
unsigned int count;
|
||||
@@ -448,7 +448,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -614,12 +613,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (se4Descriptor) {
|
||||
free((LADSPA_PortDescriptor *)se4Descriptor->PortDescriptors);
|
||||
free((char **)se4Descriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)se4Descriptor->PortRangeHints);
|
||||
free(se4Descriptor);
|
||||
}
|
||||
se4Descriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortShaper(
|
||||
static LADSPA_Handle instantiateShaper(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Shaper *plugin_data = (Shaper *)malloc(sizeof(Shaper));
|
||||
Shaper *plugin_data = (Shaper *)calloc(1, sizeof(Shaper));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -182,7 +182,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -260,12 +259,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (shaperDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)shaperDescriptor->PortDescriptors);
|
||||
free((char **)shaperDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)shaperDescriptor->PortRangeHints);
|
||||
free(shaperDescriptor);
|
||||
}
|
||||
shaperDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -33,11 +33,7 @@ void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
|
||||
inline int partition(LADSPA_Data array[], int left, int right);
|
||||
|
||||
#ifdef __clang__
|
||||
void q_sort(LADSPA_Data array[], int left, int right) {
|
||||
#else
|
||||
inline void q_sort(LADSPA_Data array[], int left, int right) {
|
||||
#endif
|
||||
float pivot = partition(array, left, right);
|
||||
|
||||
if (left < pivot) {
|
||||
@@ -164,7 +160,7 @@ static void connectPortSifter(
|
||||
static LADSPA_Handle instantiateSifter(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Sifter *plugin_data = (Sifter *)malloc(sizeof(Sifter));
|
||||
Sifter *plugin_data = (Sifter *)calloc(1, sizeof(Sifter));
|
||||
LADSPA_Data *b1 = NULL;
|
||||
long b1ptr;
|
||||
LADSPA_Data *b2 = NULL;
|
||||
@@ -366,7 +362,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -438,12 +433,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sifterDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)sifterDescriptor->PortDescriptors);
|
||||
free((char **)sifterDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sifterDescriptor->PortRangeHints);
|
||||
free(sifterDescriptor);
|
||||
}
|
||||
sifterDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ static void connectPortSinCos(
|
||||
static LADSPA_Handle instantiateSinCos(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SinCos *plugin_data = (SinCos *)malloc(sizeof(SinCos));
|
||||
SinCos *plugin_data = (SinCos *)calloc(1, sizeof(SinCos));
|
||||
float fs;
|
||||
double last_om;
|
||||
double phi;
|
||||
@@ -214,7 +214,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -296,12 +295,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sinCosDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)sinCosDescriptor->PortDescriptors);
|
||||
free((char **)sinCosDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sinCosDescriptor->PortRangeHints);
|
||||
free(sinCosDescriptor);
|
||||
}
|
||||
sinCosDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ static void connectPortSinglePara(
|
||||
static LADSPA_Handle instantiateSinglePara(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SinglePara *plugin_data = (SinglePara *)malloc(sizeof(SinglePara));
|
||||
SinglePara *plugin_data = (SinglePara *)calloc(1, sizeof(SinglePara));
|
||||
biquad *filter = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -214,7 +214,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -312,12 +311,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (singleParaDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)singleParaDescriptor->PortDescriptors);
|
||||
free((char **)singleParaDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)singleParaDescriptor->PortRangeHints);
|
||||
free(singleParaDescriptor);
|
||||
}
|
||||
singleParaDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortSinusWavewrapper(
|
||||
static LADSPA_Handle instantiateSinusWavewrapper(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SinusWavewrapper *plugin_data = (SinusWavewrapper *)malloc(sizeof(SinusWavewrapper));
|
||||
SinusWavewrapper *plugin_data = (SinusWavewrapper *)calloc(1, sizeof(SinusWavewrapper));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -166,7 +166,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -244,12 +243,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (sinusWavewrapperDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)sinusWavewrapperDescriptor->PortDescriptors);
|
||||
free((char **)sinusWavewrapperDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)sinusWavewrapperDescriptor->PortRangeHints);
|
||||
free(sinusWavewrapperDescriptor);
|
||||
}
|
||||
sinusWavewrapperDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ static void connectPortSmoothDecimate(
|
||||
static LADSPA_Handle instantiateSmoothDecimate(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SmoothDecimate *plugin_data = (SmoothDecimate *)malloc(sizeof(SmoothDecimate));
|
||||
SmoothDecimate *plugin_data = (SmoothDecimate *)calloc(1, sizeof(SmoothDecimate));
|
||||
float accum;
|
||||
float *buffer = NULL;
|
||||
int buffer_pos;
|
||||
@@ -247,7 +247,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -329,12 +328,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (smoothDecimateDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)smoothDecimateDescriptor->PortDescriptors);
|
||||
free((char **)smoothDecimateDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)smoothDecimateDescriptor->PortRangeHints);
|
||||
free(smoothDecimateDescriptor);
|
||||
}
|
||||
smoothDecimateDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void connectPortSplit(
|
||||
static LADSPA_Handle instantiateSplit(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Split *plugin_data = (Split *)malloc(sizeof(Split));
|
||||
Split *plugin_data = (Split *)calloc(1, sizeof(Split));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -162,7 +162,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -240,12 +239,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (splitDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)splitDescriptor->PortDescriptors);
|
||||
free((char **)splitDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)splitDescriptor->PortRangeHints);
|
||||
free(splitDescriptor);
|
||||
}
|
||||
splitDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ static void activateStepMuxer(LADSPA_Handle instance) {
|
||||
}
|
||||
current_ch = 0;
|
||||
last_clock = 0.0f;
|
||||
sample_rate = sample_rate;
|
||||
plugin_data->ch_gain = ch_gain;
|
||||
plugin_data->ch_state = ch_state;
|
||||
plugin_data->current_ch = current_ch;
|
||||
@@ -163,7 +164,7 @@ static void connectPortStepMuxer(
|
||||
static LADSPA_Handle instantiateStepMuxer(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
StepMuxer *plugin_data = (StepMuxer *)malloc(sizeof(StepMuxer));
|
||||
StepMuxer *plugin_data = (StepMuxer *)calloc(1, sizeof(StepMuxer));
|
||||
float *ch_gain = NULL;
|
||||
int *ch_state = NULL;
|
||||
int current_ch;
|
||||
@@ -403,7 +404,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -531,12 +531,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (stepMuxerDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)stepMuxerDescriptor->PortDescriptors);
|
||||
free((char **)stepMuxerDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)stepMuxerDescriptor->PortRangeHints);
|
||||
free(stepMuxerDescriptor);
|
||||
}
|
||||
stepMuxerDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ static void connectPortSurroundEncoder(
|
||||
static LADSPA_Handle instantiateSurroundEncoder(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
SurroundEncoder *plugin_data = (SurroundEncoder *)malloc(sizeof(SurroundEncoder));
|
||||
SurroundEncoder *plugin_data = (SurroundEncoder *)calloc(1, sizeof(SurroundEncoder));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_pos;
|
||||
unsigned int buffer_size;
|
||||
@@ -324,7 +324,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -414,12 +413,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (surroundEncoderDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)surroundEncoderDescriptor->PortDescriptors);
|
||||
free((char **)surroundEncoderDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)surroundEncoderDescriptor->PortRangeHints);
|
||||
free(surroundEncoderDescriptor);
|
||||
}
|
||||
surroundEncoderDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ static void connectPortSvf(
|
||||
static LADSPA_Handle instantiateSvf(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Svf *plugin_data = (Svf *)malloc(sizeof(Svf));
|
||||
Svf *plugin_data = (Svf *)calloc(1, sizeof(Svf));
|
||||
int sample_rate;
|
||||
sv_filter *svf = NULL;
|
||||
|
||||
@@ -300,7 +300,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -408,12 +407,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (svfDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)svfDescriptor->PortDescriptors);
|
||||
free((char **)svfDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)svfDescriptor->PortRangeHints);
|
||||
free(svfDescriptor);
|
||||
}
|
||||
svfDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ static void activateTapeDelay(LADSPA_Handle instance) {
|
||||
last_in = 0.0f;
|
||||
last2_in = 0.0f;
|
||||
last3_in = 0.0f;
|
||||
sample_rate = sample_rate;
|
||||
z0 = 0.0f;
|
||||
z1 = 0.0f;
|
||||
z2 = 0.0f;
|
||||
@@ -191,7 +192,7 @@ static void connectPortTapeDelay(
|
||||
static LADSPA_Handle instantiateTapeDelay(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
TapeDelay *plugin_data = (TapeDelay *)malloc(sizeof(TapeDelay));
|
||||
TapeDelay *plugin_data = (TapeDelay *)calloc(1, sizeof(TapeDelay));
|
||||
LADSPA_Data *buffer = NULL;
|
||||
unsigned int buffer_mask;
|
||||
unsigned int buffer_size;
|
||||
@@ -482,7 +483,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -644,12 +644,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (tapeDelayDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)tapeDelayDescriptor->PortDescriptors);
|
||||
free((char **)tapeDelayDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)tapeDelayDescriptor->PortRangeHints);
|
||||
free(tapeDelayDescriptor);
|
||||
}
|
||||
tapeDelayDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ static void activateTransient(LADSPA_Handle instance) {
|
||||
medi_track = 0.1;
|
||||
slow_track = 0.1;
|
||||
count = 0;
|
||||
sample_rate = sample_rate;
|
||||
plugin_data->buffer = buffer;
|
||||
plugin_data->buffer_pos = buffer_pos;
|
||||
plugin_data->count = count;
|
||||
@@ -143,7 +144,7 @@ static void connectPortTransient(
|
||||
static LADSPA_Handle instantiateTransient(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Transient *plugin_data = (Transient *)malloc(sizeof(Transient));
|
||||
Transient *plugin_data = (Transient *)calloc(1, sizeof(Transient));
|
||||
float *buffer = NULL;
|
||||
int buffer_pos;
|
||||
long count;
|
||||
@@ -376,7 +377,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -464,12 +464,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (transientDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)transientDescriptor->PortDescriptors);
|
||||
free((char **)transientDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)transientDescriptor->PortRangeHints);
|
||||
free(transientDescriptor);
|
||||
}
|
||||
transientDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ static void connectPortTriplePara(
|
||||
static LADSPA_Handle instantiateTriplePara(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
TriplePara *plugin_data = (TriplePara *)malloc(sizeof(TriplePara));
|
||||
TriplePara *plugin_data = (TriplePara *)calloc(1, sizeof(TriplePara));
|
||||
biquad *filters = NULL;
|
||||
float fs;
|
||||
|
||||
@@ -375,7 +375,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -593,12 +592,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (tripleParaDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)tripleParaDescriptor->PortDescriptors);
|
||||
free((char **)tripleParaDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)tripleParaDescriptor->PortRangeHints);
|
||||
free(tripleParaDescriptor);
|
||||
}
|
||||
tripleParaDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ static void connectPortValve(
|
||||
static LADSPA_Handle instantiateValve(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
Valve *plugin_data = (Valve *)malloc(sizeof(Valve));
|
||||
Valve *plugin_data = (Valve *)calloc(1, sizeof(Valve));
|
||||
plugin_data->run_adding_gain = 1.0f;
|
||||
|
||||
return (LADSPA_Handle)plugin_data;
|
||||
@@ -250,7 +250,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -332,12 +331,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (valveDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)valveDescriptor->PortDescriptors);
|
||||
free((char **)valveDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)valveDescriptor->PortRangeHints);
|
||||
free(valveDescriptor);
|
||||
}
|
||||
valveDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ static void connectPortValveRect(
|
||||
static LADSPA_Handle instantiateValveRect(
|
||||
const LADSPA_Descriptor *descriptor,
|
||||
unsigned long s_rate) {
|
||||
ValveRect *plugin_data = (ValveRect *)malloc(sizeof(ValveRect));
|
||||
ValveRect *plugin_data = (ValveRect *)calloc(1, sizeof(ValveRect));
|
||||
unsigned int apos;
|
||||
float *avg = NULL;
|
||||
int avg_size;
|
||||
@@ -319,7 +319,6 @@ void __attribute__((constructor)) swh_init() {
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#define D_(s) dgettext(PACKAGE, s)
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
#else
|
||||
#define D_(s) (s)
|
||||
@@ -401,12 +400,13 @@ void __attribute__((constructor)) swh_init() {
|
||||
}
|
||||
}
|
||||
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
void __attribute__((destructor)) swh_fini() {
|
||||
if (valveRectDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)valveRectDescriptor->PortDescriptors);
|
||||
free((char **)valveRectDescriptor->PortNames);
|
||||
free((LADSPA_PortRangeHint *)valveRectDescriptor->PortRangeHints);
|
||||
free(valveRectDescriptor);
|
||||
}
|
||||
valveRectDescriptor = NULL;
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user