Hello!
This is my first post here, please treat me well

I am new to plugin programming for XMPlay. I want to make a physical control panel for displaying and changing user rating, so I decided to learn how to make a general plugin using the DSP plugin header.
Is the purpose of SetConfig and GetConfig for me to store and retrieve my own data, or rather some special data meant to interact with XMPlay in some way?These are the function I currently am most confused about. Of course I have checked the example plugins supplied with the plugin api, but I still don't feel comfortable using them.
I noticed that the data I store and retrieve is appended to the DSP rown in
xmplay.iniAlso I want to know a correct way of using the GetConfig function. The flage plugin supplied with the plugin API does this:
static DWORD WINAPI DSP_GetConfig(void *inst, void *config)
{
FlangeStuff *flange=(FlangeStuff*)inst;
memcpy(config,&flange->conf,sizeof(flange->conf));
return sizeof(*flange); // return size of config info
}
How can this ensure that there is enough memory allocated at config, considering that the memcpy occures before DSP_GetConfig returns the size of the data stored to the caller?Is there a size limit of the data to store stated somewhere, that we are supposed to not exceed?
I will probably not need to store much data for my plugin, and I might end up giving it its own config file, but I am still curious about the intended usage of these functions.
Is the misc function for sending DDE commands is thead-safe?That is the function I know that I want to use from a thread on its own. Are there any functions in the plugin that are not thread-safe?
Is there a documentation for the plugin API other that the comments in the code?I searched a lot but my google-fuu might just not be good enough to find it.. :p
Are there any known tutorials around for writing plugins for XMPlay? As a beginner I found it difficult to setup my project to work correctly as there seems to be some difference in my environment compared to the one used to make the examples provided with the API.
The most difficult for me was to realize that the
XMPDSP_GetInterface2 was name mangled and not exported correctly with the provided code, but I had to add
extern "C" to the declaration.
If there isn't a tutorial available, maybe I could take some time to make one in the future for other beginners to find

That's all for now, thanks for a great music player! <3
