parent
28d3ca2d68
commit
0b25db0937
7 changed files with 43 additions and 15 deletions
|
@ -97,7 +97,7 @@ struct CarlaModule : Module {
|
|||
std::string patchStorage;
|
||||
|
||||
CarlaModule()
|
||||
: pcontext(reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
: pcontext(static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
|
||||
configParam<SwitchQuantity>(BIPOLAR_INPUTS, 0.f, 1.f, 1.f, "Bipolar CV Inputs")->randomizeEnabled = false;
|
||||
|
|
|
@ -47,7 +47,7 @@ struct HostCV : Module {
|
|||
configParam<SwitchQuantity>(BIPOLAR_OUTPUTS_1_5, 0.f, 1.f, 0.f, "Bipolar Outputs 1-5")->randomizeEnabled = false;
|
||||
configParam<SwitchQuantity>(BIPOLAR_OUTPUTS_6_10, 0.f, 1.f, 0.f, "Bipolar Outputs 6-10")->randomizeEnabled = false;
|
||||
|
||||
CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP);
|
||||
CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP);
|
||||
|
||||
if (pcontext == nullptr)
|
||||
throw rack::Exception("Plugin context is null.");
|
||||
|
@ -60,7 +60,7 @@ struct HostCV : Module {
|
|||
|
||||
~HostCV() override
|
||||
{
|
||||
CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP);
|
||||
CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(pcontext != nullptr,);
|
||||
|
||||
pcontext->loadedHostCV = false;
|
||||
|
@ -68,7 +68,7 @@ struct HostCV : Module {
|
|||
|
||||
void process(const ProcessArgs&) override
|
||||
{
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
const float** dataIns = pcontext->dataIns;
|
||||
float** dataOuts = pcontext->dataOuts;
|
||||
|
|
|
@ -42,7 +42,7 @@ struct HostParameters : Module {
|
|||
{
|
||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
|
||||
|
||||
CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP);
|
||||
CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP);
|
||||
|
||||
if (pcontext == nullptr)
|
||||
throw rack::Exception("Plugin context is null.");
|
||||
|
@ -57,7 +57,7 @@ struct HostParameters : Module {
|
|||
|
||||
void process(const ProcessArgs&) override
|
||||
{
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
for (uint32_t i=0; i<kModuleParameters; ++i)
|
||||
outputs[i].setVoltage(parameters[i].process(sampleTime, pcontext->parameters[i]));
|
||||
|
@ -66,7 +66,7 @@ struct HostParameters : Module {
|
|||
|
||||
void onSampleRateChange(const SampleRateChangeEvent& e) override
|
||||
{
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
const double fall = 1.0 / (double(pcontext->bufferSize) / e.sampleRate);
|
||||
|
||||
|
@ -84,12 +84,12 @@ struct HostParameters : Module {
|
|||
#ifndef HEADLESS
|
||||
struct CardinalParameterPJ301MPort : PJ301MPort {
|
||||
void onDragStart(const DragStartEvent& e) override {
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
handleHostParameterDrag(pcontext, portId, true);
|
||||
PJ301MPort::onDragStart(e);
|
||||
}
|
||||
void onDragEnd(const DragEndEvent& e) override {
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
handleHostParameterDrag(pcontext, portId, false);
|
||||
PJ301MPort::onDragEnd(e);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ struct HostTime : Module {
|
|||
{
|
||||
config(NUM_PARAMS, NUM_INPUTS, kHostTimeCount, kHostTimeCount);
|
||||
|
||||
CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP);
|
||||
CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP);
|
||||
|
||||
if (pcontext == nullptr)
|
||||
throw rack::Exception("Plugin context is null.");
|
||||
|
@ -50,7 +50,7 @@ struct HostTime : Module {
|
|||
|
||||
void process(const ProcessArgs& args) override
|
||||
{
|
||||
if (CardinalPluginContext* const pcontext = reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
if (CardinalPluginContext* const pcontext = static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
const bool playing = pcontext->playing;
|
||||
const bool playingWithBBT = playing && pcontext->bbtValid;
|
||||
|
|
|
@ -270,7 +270,7 @@ struct IldaeilModule : Module {
|
|||
IldaeilMidiGenerator midiGenerator;
|
||||
|
||||
IldaeilModule()
|
||||
: pcontext(reinterpret_cast<CardinalPluginContext*>(APP))
|
||||
: pcontext(static_cast<CardinalPluginContext*>(APP))
|
||||
{
|
||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
|
||||
for (uint i=0; i<2; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue