Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

JOL

design problem and audioplugins

This topic is 6383 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
I really would appreciate some ideas or suggestions on designing this ?!?!?

Share this post


Link to post
Share on other sites
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...
}

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!