lindenbergresearch / LRTRack

LRT Audio-Modules for VCVRack
Other
57 stars 10 forks source link

src/SimpleFilter.cpp:84:39: error: ‘gSampleRate’ was not declared in this scope #2

Closed senisioi closed 6 years ago

senisioi commented 6 years ago

Compiling this code with the latest Rack checkout throws some errors. The Plugin instance is not needed when calling createModel and std:: has to be specified before calling the abs function. Actually, the init function should look something like this to be compatible with the latest rack:

void init(rack::Plugin *p) {
    plugin = p;
    plugin->slug = "Lindenberg Research";
    p->addModel(createModel<SimpleFilterWidget>("Lindenberg Research", "LPFilter24dB", "24dB Lowpass Filter"));
    p->addModel(createModel<BlankPanelWidget>("Lindenberg Research", "BlankPanel", "Blank Panel 26TE"));
    p->addModel(createModel<ReShaperWidget>("Lindenberg Research", "ReShaper", "ReShaper Wavefolder"));
}

After doing these changes, I'm left with the error ‘gSampleRate’ was not declared in this scope. Where is this variable coming from?

fenykep commented 6 years ago

It is not declared, you should use the engineGetSampleRate() function for it, which can be called in the place of the variable. I'm new to github, how can I upload the fixed files? [edit]: I've created a pull request with the two fixed files, you could clone them, it works for me (win7, dev).

senisioi commented 6 years ago

I can see you created a merge request. Someone has too approve and merge your changes.

fenykep commented 6 years ago

Yes, but until then you could clone my fork, or manually fix the code on your machine.

lindenbergresearch commented 6 years ago

These are issues for Rack v0.5.0, I will prepare today to work with the new version of Rack. I accepted the request, thanks for your help gentleman!