-
Notifications
You must be signed in to change notification settings - Fork 63
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
outsource DSP functions #253
Comments
If you like, I'd create the file and start to port the stuff. Is mostly a matter of grepping for vDSP and outsource this all. BUT I do not know the Apple DSP functions, thus you'd have to look over my source before merging (which you will do anyway). Or you give me some tipps (using const float references as parameters maybe?) |
This sounds like a good idea to me. @ndonald2, what do you think? I'd rather not introduce another layer of function lookup overhead (even though I know the effect will be fairly negligible). I know macros won't introduce any function overhead. I suspect that any functions defined in a dsp header would be inlined, but I don't know for sure. |
Yes, this is a great idea. I had started down this road awhile back but never saw it through. Another good option might be to have multiple .cpp implementation files for the core DSP header that each use platform macros to compile the whole thing or nothing. i.e. // TonicDSP_apple.cpp
#ifdef USE_APPLE_ACCELERATE
#include "TonicDSP.h"
...
// All the implementations for the DSP functions
...
#endif and so on. |
@morganpackard @ndonald2 So maybe we could use something like // TonicDSP.h
#ifdef USE_APPLE_ACCELERATE
#include "TonicDSP_Apple.h"
...
// other Systems
...
#else
#include "TonicDSP_Naive.h"
#endif |
Supercollider uses something like this, that has been factored out into a On Wed, Jan 28, 2015 at 3:55 PM, Nick Donaldson [email protected]
Morgan Packard |
@andik On Wed, Jan 28, 2015 at 4:39 PM, andik [email protected] wrote:
Morgan Packard |
@morganpackard I was wrong in ever worrying about the overhead, it's negligible. Certain wizard-like engineers at a particular audio company that I have connections with have shared certain information about whether or not inlining such functions is important. It's definitely not. Turns out the compiler tends to inline such tiny functions anyway when optimizing. |
Hey guys,
as I look into the various (control-)generators of Tonic, I see this
#ifdef __APPLE__ ... #else ... #endif
stuff all around, for example in the ADSR. I personally think this makes the code hard to comprehend and hard to maintain/adapt.I propose therefore a
TonicDSP.h
Headerfile which is used to abstract the DSP stuff away as much as possible...for example (from ADSR)
another option would be macros:
I prefer the first.
one could create that header, mark it as DSP Port Header and add the DSP Functions whenever one finds one. This way nearly no immediate efford is required. And it would also help to port Tonic to new platforms...
The text was updated successfully, but these errors were encountered: