I have a delay object in my plugin (instantiated from a Delay class).
This delay object should also contain a filter object for the feedback path (derived from a Filter class).
I can do this making a public pointer to the filter in the Delay class:
Then I can access the filter functions in my plugin (main) class by doing:
This works (it seems) but is it a bad idea ? (bad coding practice etc.)
This delay object should also contain a filter object for the feedback path (derived from a Filter class).
I can do this making a public pointer to the filter in the Delay class:
Code:
// Delay.cpp
#include "Filter.h"
class Delay
{
public:
Delay() { mFilter = new Filter()}; // constr.
Filter* mFilter;
...
}
Code:
mDelay.mFilter->doSomething();
containment
Aucun commentaire:
Enregistrer un commentaire