Main > Audio/Jukebox/MP3 Forum
Plugins: Document API for JukePlugSys
unclet:
In my code, the Shutdown() routine was being called twice by mistake. I fix it and the crash went away, but I believe you new changes should be done anyway. Thanks.
headkaze:
loadman: You are very close. I added a few extra bits and pieces so it's basically identical to the C++ dll now. Here is the latest plugin with both C++ and Delphi plugin examples.
--- Code: ---library JukePlugin;
uses
Dialogs,
SysUtils,
Classes;
{$R *.res}
var
PLUGIN_NAME : PChar = 'LCD Display';
PLUGIN_AUTHOR : PChar = 'Loadman';
PLUGIN_VERSION : PChar = 'Beta A';
PLUGIN_DESCRIPTION : PChar = 'This is a plugin';
Buffer: array[0..8192] of Char;
function Juke_Initialize(Value: Integer):Integer; stdcall;
begin
// Showmessage('DLL has recieved Juke_Shutdown message');
Result := 1
end;
function Juke_Shutdown(Value: Integer):Integer; stdcall;
begin
// Showmessage('DLL has recieved Juke_Shutdown message');
Result := 1
end;
function Juke_GetPluginInfo(Value:integer):PChar; stdcall;
begin
Result := PChar(PLUGIN_NAME + '|' + PLUGIN_AUTHOR + '|' + PLUGIN_VERSION + '|' + PLUGIN_DESCRIPTION);
end;
function Juke_Command(Name:PChar; Value:PChar):PChar; stdcall;
begin
StrCopy(Buffer, Value);
Result := Buffer
end;
exports
Juke_GetPluginInfo,
Juke_Initialize,
Juke_Shutdown,
Juke_Command;
begin
end.
--- End code ---
unclet:
headkaze
That works ....thanks.
I came back to tell you the good news and noticed you posted yet another version of the JukePlugin ....... :) I guess I will upgrade again
headkaze:
--- Quote from: unclet on January 08, 2008, 09:52:22 pm ---headkaze
That works ....thanks.
I came back to tell you the good news and noticed you posted yet another version of the JukePlugin ....... :) I guess I will upgrade again
--- End quote ---
hehe yeah sorry that should be about it for a while ;) I just wanted to add the corrected Delphi example for loadman. Now he's ready to code his plugin :)
Space Fractal should post a Power Basic plugin example using the new plugin system, then someone should write up some docs and include a list of the common commands and then your just about ready to release the JPS SDK v1.0.
unclet:
I still think the command name and value formats need to be agreed on.
Hey, I really can not stand the "|" character since it is hard to read next to characters like "I", "L" and "1" so how about we use the ">" instead as a separator character like I previously recommended?
Unless the "|" character is some kind of standard.....
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version