| @@ -546,6 +546,7 @@ public: | |||
| void setChunkData(const char* const stringData) | |||
| { | |||
| Q_ASSERT(m_hints & PLUGIN_USES_CHUNKS); | |||
| Q_ASSERT(stringData); | |||
| QString filePath; | |||
| @@ -1358,7 +1358,7 @@ public: | |||
| /*! | |||
| * Plugin process callback. | |||
| */ | |||
| virtual void process(float* const* const inBuffer, float* const* const outBuffer, const uint32_t frames, const uint32_t framesOffset = 0) | |||
| virtual void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset = 0) | |||
| { | |||
| Q_UNUSED(inBuffer); | |||
| Q_UNUSED(outBuffer); | |||
| @@ -210,7 +210,6 @@ void CarlaPluginThread::run() | |||
| case PLUGIN_THREAD_VST_GUI: | |||
| /* osc_url */ arguments << QString("%1/%2").arg(engine->getOscServerPath()).arg(plugin->id()); | |||
| /* filename */ arguments << plugin->filename(); | |||
| /* label */ arguments << m_label; | |||
| /* ui-title */ arguments << QString("%1 (GUI)").arg(plugin->name()); | |||
| break; | |||
| @@ -244,6 +244,7 @@ public: | |||
| void setChunkData(const char* const stringData) | |||
| { | |||
| Q_ASSERT(m_hints & PLUGIN_USES_CHUNKS); | |||
| Q_ASSERT(stringData); | |||
| static QByteArray chunk; | |||
| @@ -311,9 +312,12 @@ public: | |||
| } | |||
| else | |||
| { | |||
| osc_send_hide(&osc.data); | |||
| osc_send_quit(&osc.data); | |||
| osc_clear_data(&osc.data); | |||
| if (osc.data.target) | |||
| { | |||
| osc_send_hide(&osc.data); | |||
| osc_send_quit(&osc.data); | |||
| osc_clear_data(&osc.data); | |||
| } | |||
| if (! osc.thread->wait(500)) | |||
| osc.thread->quit(); | |||
| @@ -327,6 +331,7 @@ public: | |||
| void reload() | |||
| { | |||
| qDebug("DssiPlugin::reload() - start"); | |||
| Q_ASSERT(descriptor && ldescriptor); | |||
| // Safely disable plugin for reload | |||
| const ScopedDisabler m(this); | |||
| @@ -403,7 +408,7 @@ public: | |||
| paramBuffers = new float[params]; | |||
| } | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 1; | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 2; | |||
| char portName[portNameSize]; | |||
| bool needsCtrlIn = false; | |||
| bool needsCtrlOut = false; | |||
| @@ -641,7 +646,7 @@ public: | |||
| param.portCout = (CarlaEngineControlPort*)x_client->addPort(CarlaEnginePortTypeControl, portName, false); | |||
| } | |||
| if (mIns > 0) | |||
| if (mIns == 1) | |||
| { | |||
| #ifndef BUILD_BRIDGE | |||
| if (carlaOptions.processMode != PROCESS_MODE_MULTIPLE_CLIENTS) | |||
| @@ -698,7 +703,7 @@ public: | |||
| // Delete old programs | |||
| if (midiprog.count > 0) | |||
| { | |||
| for (uint32_t i=0; i < midiprog.count; i++) | |||
| for (i=0; i < midiprog.count; i++) | |||
| { | |||
| if (midiprog.data[i].name) | |||
| free((void*)midiprog.data[i].name); | |||
| @@ -786,7 +791,7 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Plugin processing | |||
| void process(float* const* const inBuffer, float* const* const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| { | |||
| uint32_t i, k; | |||
| unsigned long midiEventCount = 0; | |||
| @@ -801,9 +806,7 @@ public: | |||
| if (aIn.count > 0) | |||
| { | |||
| uint32_t count = h2 ? 2 : aIn.count; | |||
| if (count == 1) | |||
| if (aIn.count == 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -811,7 +814,7 @@ public: | |||
| aInsPeak[0] = abs(inBuffer[0][k]); | |||
| } | |||
| } | |||
| else if (count > 1) | |||
| else if (aIn.count > 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -1227,16 +1230,14 @@ public: | |||
| double bal_rangeL, bal_rangeR; | |||
| float oldBufLeft[do_balance ? frames : 0]; | |||
| uint32_t count = h2 ? 2 : aOut.count; | |||
| for (i=0; i < count; i++) | |||
| for (i=0; i < aOut.count; i++) | |||
| { | |||
| // Dry/Wet | |||
| if (do_drywet) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| if (aOut.count == 1 && ! h2) | |||
| if (aOut.count == 1) | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[0][k]*(1.0-x_dryWet)); | |||
| else | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[i][k]*(1.0-x_dryWet)); | |||
| @@ -381,6 +381,7 @@ public: | |||
| void reload() | |||
| { | |||
| qDebug("FluidSynthPlugin::reload() - start"); | |||
| Q_ASSERT(f_synth); | |||
| // Safely disable plugin for reload | |||
| const ScopedDisabler m(this); | |||
| @@ -802,7 +803,7 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Plugin processing | |||
| void process(float**, float** outBuffer, uint32_t frames, uint32_t framesOffset) | |||
| void process(float** const, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| { | |||
| uint32_t i, k; | |||
| uint32_t midiEventCount = 0; | |||
| @@ -333,6 +333,7 @@ public: | |||
| void reload() | |||
| { | |||
| qDebug("LadspaPlugin::reload() - start"); | |||
| Q_ASSERT(descriptor); | |||
| // Safely disable plugin for reload | |||
| const ScopedDisabler m(this); | |||
| @@ -406,7 +407,7 @@ public: | |||
| paramBuffers = new float[params]; | |||
| } | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 1; | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 2; | |||
| char portName[portNameSize]; | |||
| bool needsCtrlIn = false; | |||
| bool needsCtrlOut = false; | |||
| @@ -664,7 +665,7 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Plugin processing | |||
| void process(float* const* const inBuffer, float* const* const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| { | |||
| uint32_t i, k; | |||
| @@ -678,9 +679,7 @@ public: | |||
| if (aIn.count > 0) | |||
| { | |||
| uint32_t count = h2 ? 2 : aIn.count; | |||
| if (count == 1) | |||
| if (aIn.count == 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -688,7 +687,7 @@ public: | |||
| aInsPeak[0] = abs(inBuffer[0][k]); | |||
| } | |||
| } | |||
| else if (count > 1) | |||
| else if (aIn.count > 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -912,16 +911,14 @@ public: | |||
| double bal_rangeL, bal_rangeR; | |||
| float oldBufLeft[do_balance ? frames : 0]; | |||
| uint32_t count = h2 ? 2 : aOut.count; | |||
| for (i=0; i < count; i++) | |||
| for (i=0; i < aOut.count; i++) | |||
| { | |||
| // Dry/Wet | |||
| if (do_drywet) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| if (aOut.count == 1 && ! h2) | |||
| if (aOut.count == 1) | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[0][k]*(1.0-x_dryWet)); | |||
| else | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[i][k]*(1.0-x_dryWet)); | |||
| @@ -134,6 +134,7 @@ public: | |||
| void reload() | |||
| { | |||
| qDebug("LinuxSamplerPlugin::reload() - start"); | |||
| Q_ASSERT(instrument); | |||
| // Safely disable plugin for reload | |||
| const ScopedDisabler m(this); | |||
| @@ -271,7 +272,7 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Plugin processing | |||
| void process(float**, float** outBuffer, uint32_t frames, uint32_t framesOffset) | |||
| void process(float** const, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| { | |||
| uint32_t i, k; | |||
| uint32_t midiEventCount = 0; | |||
| @@ -311,12 +311,6 @@ public: | |||
| #ifndef BUILD_BRIDGE | |||
| case GUI_EXTERNAL_OSC: | |||
| if (osc.data.target) | |||
| { | |||
| osc_send_hide(&osc.data); | |||
| osc_send_quit(&osc.data); | |||
| } | |||
| if (osc.thread) | |||
| { | |||
| // Wait a bit first, try safe quit, then force kill | |||
| @@ -328,7 +322,6 @@ public: | |||
| delete osc.thread; | |||
| } | |||
| break; | |||
| #endif | |||
| } | |||
| @@ -1009,9 +1002,12 @@ public: | |||
| } | |||
| else | |||
| { | |||
| osc_send_hide(&osc.data); | |||
| osc_send_quit(&osc.data); | |||
| osc_clear_data(&osc.data); | |||
| if (osc.data.target) | |||
| { | |||
| osc_send_hide(&osc.data); | |||
| osc_send_quit(&osc.data); | |||
| osc_clear_data(&osc.data); | |||
| } | |||
| if (! osc.thread->wait(500)) | |||
| osc.thread->quit(); | |||
| @@ -1036,6 +1032,7 @@ public: | |||
| void reload() | |||
| { | |||
| qDebug("Lv2Plugin::reload() - start"); | |||
| Q_ASSERT(descriptor && rdf_descriptor); | |||
| // Safely disable plugin for reload | |||
| const ScopedDisabler m(this); | |||
| @@ -1206,7 +1203,7 @@ public: | |||
| paramBuffers = new float[params]; | |||
| } | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 1; | |||
| const int portNameSize = CarlaEngine::maxPortNameSize() - 2; | |||
| char portName[portNameSize]; | |||
| bool needsCtrlIn = false; | |||
| bool needsCtrlOut = false; | |||
| @@ -1670,7 +1667,7 @@ public: | |||
| // Delete old programs | |||
| if (midiprog.count > 0) | |||
| { | |||
| for (uint32_t i=0; i < midiprog.count; i++) | |||
| for (i=0; i < midiprog.count; i++) | |||
| { | |||
| if (midiprog.data[i].name) | |||
| free((void*)midiprog.data[i].name); | |||
| @@ -1767,7 +1764,7 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Plugin processing | |||
| void process(float* const* const inBuffer, float* const* const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const uint32_t framesOffset) | |||
| { | |||
| uint32_t i, k; | |||
| uint32_t midiEventCount = 0; | |||
| @@ -1831,9 +1828,7 @@ public: | |||
| if (aIn.count > 0) | |||
| { | |||
| uint32_t count = h2 ? 2 : aIn.count; | |||
| if (count == 1) | |||
| if (aIn.count == 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -1841,7 +1836,7 @@ public: | |||
| aInsPeak[0] = abs(inBuffer[0][k]); | |||
| } | |||
| } | |||
| else if (count > 1) | |||
| else if (aIn.count > 1) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| @@ -2349,16 +2344,14 @@ public: | |||
| double bal_rangeL, bal_rangeR; | |||
| float oldBufLeft[do_balance ? frames : 0]; | |||
| uint32_t count = h2 ? 2 : aOut.count; | |||
| for (i=0; i < count; i++) | |||
| for (i=0; i < aOut.count; i++) | |||
| { | |||
| // Dry/Wet | |||
| if (do_drywet) | |||
| { | |||
| for (k=0; k < frames; k++) | |||
| { | |||
| if (aOut.count == 1 && ! h2) | |||
| if (aOut.count == 1) | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[0][k]*(1.0-x_dryWet)); | |||
| else | |||
| outBuffer[i][k] = (outBuffer[i][k]*x_dryWet)+(inBuffer[i][k]*(1.0-x_dryWet)); | |||