Jump to content

  • Log In with Google      Sign In   
  • Create Account


design problem and audioplugins


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 JOL   Members   -  Reputation: 160

Like
Likes
Like

Posted 27 January 2001 - 09:07 AM

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....

Sponsor:

#2 JOL   Members   -  Reputation: 160

Like
Likes
Like

Posted 27 January 2001 - 10:44 AM

I really would appreciate some ideas or suggestions on designing this ?!?!?

#3 Shannon Barber   Moderators   -  Reputation: 1355

Like
Likes
Like

Posted 29 January 2001 - 10:56 AM

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...
}




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS