Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
senisioi opened this issue Nov 19, 2017 · 4 comments

Comments

@senisioi
Copy link

senisioi commented Nov 19, 2017

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
Copy link
Contributor

fenykep commented Nov 19, 2017

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
Copy link
Author

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

@fenykep
Copy link
Contributor

fenykep commented Nov 19, 2017

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

@lindenbergresearch
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants