design problem and audioplugins

Started by
1 comment, last by JOL 23 years, 2 months ago
I have this design problem.... I''m working on a app that is supposed to deal alot with plugins, (windows dll - audio plugins), but the thing is, these plugins need to be ACTIVE in the way that, once activated they may send events and stuff to the main program. I have no problem figuring out how to deal with nonactive plugs, that doesn''t do anything until told to, but I need the plugins to be as versatile and generalpurpose as possible, to be standalone modules(objects) but still interacting with the main program. How should I implement that, with a shared object or with messages, and will messages always work in all situations, I want to create a general design that allows me to extend the application. also - do you have any tips in designing an audio application....
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I'm looking for work
Advertisement
I really would appreciate some ideas or suggestions on designing this ?!?!?
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I'm looking for work
You can use an Observer pattern

Your plug-in object needs an AttachObserver(), and when they''re loaded you attach the main object


class CPlugInObserver
{
virtual ChangeNotification(CPlugIn*,...)=0;
}

class CPlugIn
{
AttachObserver(CPlugInObserver*)
void Notify();
}
CPlugIn::Notify()
{
for each Observer
pObserver->ChangeNotification(this, ...);
}

class CMyAmp : CPlugInObserver
{
virtual ChangeNotification(CPlugIn*,...);
}

CMyAmp::LoadPlugIn(...)
{
pPlugIn = CreateNewPlugIn(...);
pPlugIn->AttachObserver(this);
}

CMyAmp::ChangeNotification(CPlugIn*,...)
{
//Need to do something here...
}
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement