Right now things are pretty inefficient and all messages are sent to all 
plugins. We always had plans to allow plugins to "subscribe" to 
different types of messages... just never happened. That said, my memory 
is a little rusty but here is what you should need to do.

1. Define a new event that inherits from Event. You can see examples of 
this in base\include\eventdata.h
2. Next you need to add a case in Player::ServiceEvent() 
(base\src\player.cpp) that forwards the event via the SendEventToUI() 
functioan call... just append it to the long list of other events.
3. In your PMO you should look for your new event in your event loop. 
Search for PeekEvent() and GetEvent() in the current PMO for where it is 
checking the queue.

Hope this helps.


James Ryan wrote:

> Hi guys,
> I would really appreciate some help regarding the matter bellow.
> I would like to notify the class SoundCardPMO that something has 
> changed in the PreferenceWindow (i.e. Win32PreferenceWindow class).
> I am aware that there is an eventdata header file which has classes 
> that inherits from event.
> How do I go about using this facility. Any help in this matter would 
> be really appreciated.
> The main two things I would like to know are how do I send the message 
> and once the message is sent how do I from SoundCardPMO detect that a 
> message has been sent.
> Thank you very much.
> James
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> _______________________________________________
> http://www.freeamp.org/mailman/listinfo/freeamp-dev


Reply via email to