Main > Audio/Jukebox/MP3 Forum

Plugins: Document API for JukePlugSys

<< < (8/80) > >>

unclet:

--- Quote ---Since they are just strings you can have unique commands for your juke and commands that are supported by most jukes.
--- End quote ---

Yes, this is my point  ..... this list could be expanded to standardize commands which are currently only used by some jukebox software.  In the future, if a particular command is integrated into some other jukebox software, then at least the command has been standardized and already included in this list ....... so the software does not need to create it's owm unique at that time.   We can all stay standardized based on the "PlugMyJuke" standards.   Just some jukebox software will support some of the commands and other jukebox software will support newer ones.

I also agree "strings" would probably be better than enum values....

Space Fractal:
The only problem is some commands is very diffecent for the nearly same feature.

MultiJuke example I use GENRE_LOCK instead of PARTY_LOCK. Freebox if I remember correct use CAUSAL for the same feature.

I could change the commands to only use the most used commands, but many unique command would not been controlled (ALL software have unique commands, that is why they wrote they own software)....

Now the commands.txt is gone, how could the external plugin known about the command used by the software?

Should the plugin writer just tell the user, you need to init the plugin once for first time, so the plugin can get the command list (because I asume the plugin writer would save the command list as well when it quit)? Not a problem for me.

We could even use a basic default list, that can been expandedable by the jukebox software with its unique commands?

headkaze:

--- Quote from: Space Fractal on January 06, 2008, 07:38:25 am ---The only problem is some commands is very diffecent for the nearly same feature.

MultiJuke example I use GENRE_LOCK instead of PARTY_LOCK. Freebox if I remember correct use CAUSAL for the same feature.

I could change the commands to only use the most used commands, but many unique command would not been controlled (ALL software have unique commands, that is why they wrote they own software)....

Now the commands.txt is gone, how could the external plugin known about the command used by the software?

Should the plugin writer just tell the user, you need to init the plugin once for first time, so the plugin can get the command list (because I asume the plugin writer would save the command list as well when it quit)? Not a problem for me.

We could even use a basic default list, that can been expandedable by the jukebox software with its unique commands?

--- End quote ---

The author doesn't need to know what commands are used by the software. But they should be able to read the documentation that comes with your Jukebox if they want to see which ones are supported.

Here is how it would work in the plugin


--- Code: ---int Juke_Command(String Name, String Value)
{
switch(Name)
{
case "JUKE_PLAY":
break;
case "JUKE_VOLUME_UP":
break;
case "JUKE_VOLUME_DOWN":
break;
case "JUKE_PARTY_LOCK_ON":
break;
case "JUKE_PARTY_LOCK_OFF":
break;
case "JUKE_MUTE_ON":
break;
case "JUKE_MUTE_OFF":
break;
}

return 1;
}
--- End code ---

If your Jukebox software doesn't send one of the commands the plugin will never receive it, so that function is not used in your Juke software. If your Juke does support the command and sends it then the plugin will process the command.

Like I said the plugin does not need to know what commands are supported. The author of the plugin only implements the commands that he/she wants to. If the software supports it then that function of the plugin works, if not it doesn't.

Space Fractal:
The implement of the commands for the plugin should been configurated by the user, not by the plugin author. That is why they might use a executeable exe file for its plugin.

It simply up to the user of that plugin, how the commands should been used and how.

Example if I want to use a Sound Effect plugin:
I might want to play a sample when a "CoinInsert" command was sent by Jukebox Software to make a coin sound. The command list in the plugin config configuration would been a list form.

Because all commands was sent to the plugin using Juke_CommandList() (I rename to that to avoid confuction instead of Juke_CommandInit), the plugin known there is a "CoinInsert" command.

In this case the plugin writer does not really need response back to the user, but just listen to the Juke_CommandSend() for any commands sent (just changed the name to that).

I also asume the Plugin Writer use a linked link, not a array, system that hold all used commands and they known some commands can use as a switch (marked with a *).

Space Fractal:
I just updated the SDK with the changed name and the example plugin, due for few functions changed around Juke_Command thing.

I have included *.lib files for importing dll functions easier (for those language that use them).






Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version