I did some work on the WinAmp plugins and I thought their process
was quite flexible and efficient.
Firstly, the user specified which plugins to use, defaults were setup
initially. This had the advantage that if there were multiple input
plugins that could handle the same stream, but the user wanted to
use one over another for some reason then it was possible to
specify which to use.
The only thing I didn't like about the scheme was there didn't
appear to be any way of specifying the plugins from a command
line or from an external program. The way to get around it though
was to open the config file, change the plugin assignments, close
the file and then run the program.
I would like to see FreeAmp permit a command line option and/or a
message from an external "launcher" program to specify which
plugin(s) to use. This could be changed dynamically, e.g., when
switching from a ShoutCast input to a local file.
Secondly, the WinAmp guys designed a very simple/clean
interface between the plugins and the "player". It consisted of a
single DLL procedure call with a standard name, all input plugin for
instance used the same entry name. A data structure was
returned which provided the address of calling functions for
common procedures like init, config, quit and sample. Using this
interface it is actually very simple to write your own plugins. I was
able to write a DSP output plugin using Delphi in a few hours.
If we did something like this it would make it very easy for others
like myself to add PMI's, PMO's and LMC's. Then, the user could
specify which plugin to use and at that time the player would load
and use the dll.
There are other IPC mechanisms we could use but the simple
PostMessage (windows) seems the simplest to start with. Another
choice might be DDE.
Craig