Merge branch 'stable-1.1'
Conflicts: include/Plugin.h src/core/Plugin.cpp
This commit is contained in:
@@ -7,9 +7,9 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include"
|
||||
INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
|
||||
SET(INLINE_FLAGS "")
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
|
||||
ENDIF(NOT LMMS_BUILD_APPLE)
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include "SweepVF.h"
|
||||
@@ -85,7 +87,7 @@ SweepVFI::one_cycle (int frames)
|
||||
modulation *= scale * f;
|
||||
svf.set_f_Q (max (.001, f + modulation), Q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
int n = std::min<int> (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
F (d, i, svf.process (s[i] + normal), adding_gain);
|
||||
@@ -231,7 +233,7 @@ SweepVFII::one_cycle (int frames)
|
||||
|
||||
svf.set_f_Q (max (.001, f + modulation1), q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
int n = std::min<int> (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
F (d, i, svf.process (s[i] + normal), adding_gain);
|
||||
@@ -385,7 +387,7 @@ AutoWah::one_cycle (int frames)
|
||||
m *= scale * .08;
|
||||
svf.set_f_Q (max (.001, f + m), Q);
|
||||
|
||||
int n = min (frames, BLOCK_SIZE);
|
||||
int n = std::min<int> (frames, BLOCK_SIZE);
|
||||
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
|
||||
@@ -69,10 +69,7 @@ class ToneStack
|
||||
// digital coefficients
|
||||
double dcoef_a[Order + 1];
|
||||
double dcoef_b[Order + 1];
|
||||
double af[Order + 1];
|
||||
double bf[Order + 1];
|
||||
|
||||
double fs;
|
||||
TDFII<Order> filter;
|
||||
|
||||
public:
|
||||
@@ -209,10 +206,6 @@ class ToneStackLT
|
||||
// digital coefficients
|
||||
double *kcoef;
|
||||
double *vcoef;
|
||||
double af [Order + 1];
|
||||
double bf [Order + 1];
|
||||
|
||||
double fs;
|
||||
LatFilt<Order> filter;
|
||||
|
||||
public:
|
||||
|
||||
@@ -277,8 +277,6 @@ class LoFi : public CMT_PluginInstance {
|
||||
BandwidthLimit *bandwidth_l;
|
||||
BandwidthLimit *bandwidth_r;
|
||||
|
||||
int last_trigger;
|
||||
|
||||
public:
|
||||
LoFi(const LADSPA_Descriptor *,
|
||||
unsigned long s_rate)
|
||||
|
||||
@@ -49,14 +49,13 @@ namespace pink_full {
|
||||
Voss-McCartney algorithm described at www.firstpr.com.au/dsp/pink-noise/ */
|
||||
class Plugin : public CMT_PluginInstance {
|
||||
private:
|
||||
LADSPA_Data sample_rate;
|
||||
PinkNoise noise_source;
|
||||
public:
|
||||
|
||||
Plugin(const LADSPA_Descriptor *,
|
||||
unsigned long s_rate) :
|
||||
CMT_PluginInstance(n_ports),
|
||||
sample_rate(s_rate) {
|
||||
CMT_PluginInstance(n_ports)
|
||||
{
|
||||
}
|
||||
|
||||
~Plugin() {
|
||||
|
||||
@@ -86,7 +86,6 @@ 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;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
static char const ident[] = "$Header: /home/cvs/giga/ladspa-swh/gsm/gsm_create.c,v 1.1 2001/06/10 21:36:51 swh Exp $";
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
@@ -224,7 +224,6 @@ 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;
|
||||
@@ -238,8 +237,6 @@ 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
|
||||
@@ -322,7 +319,6 @@ 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;
|
||||
@@ -336,8 +332,6 @@ 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
|
||||
|
||||
@@ -817,7 +817,6 @@ 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;
|
||||
|
||||
@@ -927,8 +926,6 @@ 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
|
||||
|
||||
@@ -1204,7 +1201,6 @@ 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;
|
||||
|
||||
@@ -1314,8 +1310,6 @@ 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
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
the stack and crap like that.
|
||||
*/
|
||||
|
||||
static const float _truncate_half = 0.5f;
|
||||
//static const float _truncate_half = 0.5f;
|
||||
|
||||
int truncate(float flt) {
|
||||
int i;
|
||||
|
||||
@@ -79,7 +79,6 @@ 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);
|
||||
|
||||
@@ -207,8 +207,6 @@ 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);
|
||||
|
||||
@@ -100,7 +100,6 @@ 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;
|
||||
|
||||
@@ -116,7 +116,6 @@ 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;
|
||||
|
||||
@@ -97,7 +97,6 @@ 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;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "bit_invader.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "graph.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "dynamics_processor_controls.h"
|
||||
#include "dynamics_processor.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -57,11 +57,10 @@ Plugin::Descriptor PLUGIN_EXPORT nes_plugin_descriptor =
|
||||
}
|
||||
|
||||
|
||||
NesObject::NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph, fpp_t frames ) :
|
||||
NesObject::NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph ) :
|
||||
m_parent( nes ),
|
||||
m_samplerate( samplerate ),
|
||||
m_nph( nph ),
|
||||
m_fpp( frames )
|
||||
m_nph( nph )
|
||||
{
|
||||
m_pitchUpdateCounter = 0;
|
||||
m_pitchUpdateFreq = wavelength( 60.0f );
|
||||
@@ -561,7 +560,7 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
|
||||
|
||||
if ( n->totalFramesPlayed() == 0 || n->m_pluginData == NULL )
|
||||
{
|
||||
NesObject * nes = new NesObject( this, engine::mixer()->processingSampleRate(), n, engine::mixer()->framesPerPeriod() );
|
||||
NesObject * nes = new NesObject( this, engine::mixer()->processingSampleRate(), n );
|
||||
n->m_pluginData = nes;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class NesInstrument;
|
||||
class NesObject
|
||||
{
|
||||
public:
|
||||
NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph, fpp_t frames );
|
||||
NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph );
|
||||
virtual ~NesObject();
|
||||
|
||||
void renderOutput( sampleFrame * buf, fpp_t frames );
|
||||
@@ -149,7 +149,6 @@ private:
|
||||
NesInstrument * m_parent;
|
||||
const sample_rate_t m_samplerate;
|
||||
NotePlayHandle * m_nph;
|
||||
fpp_t m_fpp;
|
||||
|
||||
int m_pitchUpdateCounter;
|
||||
int m_pitchUpdateFreq;
|
||||
|
||||
@@ -160,7 +160,6 @@ private:
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent );
|
||||
|
||||
float m_harmonics [18];
|
||||
|
||||
private slots:
|
||||
void updateAllDetuning();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "Basic_Gb_Apu.h"
|
||||
|
||||
#include "papu_instrument.h"
|
||||
#include "base64.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Watsyn.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "waveshaper_controls.h"
|
||||
#include "waveshaper.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
|
||||
Reference in New Issue
Block a user