Main > Audio/Jukebox/MP3 Forum

Plugins: Document API for JukePlugSys

<< < (26/80) > >>

headkaze:

--- Quote from: unclet on January 08, 2008, 10:04:38 pm ---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.....

--- End quote ---

Geez your picky aren't you unclet?  ;D

Pipe is used alot in cases like this (splitting string values). I would keep it like that ;)

loadman: Just so you know in the Plug_Command() function to return parameters back to the Jukebox you would do this..


--- Code: ---StrCopy(Buffer, "Value1|Value2|Value3|Value4");
Result := Buffer

--- End code ---

That will return Value1, Value2, Value3 and Value 4.

Actually to be on the safe side you probably should change the following also


--- Code: ---function Juke_GetPluginInfo(Value:integer):PChar; stdcall;
begin
  StrCopy(Buffer, PChar(PLUGIN_NAME + '|' + PLUGIN_AUTHOR + '|' + PLUGIN_VERSION + '|' + PLUGIN_DESCRIPTION));
  Result := Buffer
end;
--- End code ---

That is just a cleaner way of doing it.

loadman:

--- Quote from: headkaze on January 08, 2008, 09:45:16 pm ---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.

--- End quote ---

Mate, It seemed to work but I will do it your way as you know better coding practice  ;D


--- Quote from: headkaze on January 08, 2008, 10:01:11 pm ---
--- 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 ---
I just wanted to add the corrected Delphi example for loadman. Now he's ready to code his plugin :)

--- End quote ---

 :cheers:

ALL:

A big thanks to everyone for hanging in there.   :applaud:

It got a bit tense and frustrating for a while.  :'(

We seem to be past that and very close to JPS SDK v1.0.   ;D

unclet:
Here is my proposal for the Command name/value strings:

Note1: The commandName string is first (with a description) and the commandValue string format is underneath

Note2: I decided having separate commands for each function is a lot easier since it allows for one big case statement for processing.   Also too much combining tends to seem like we are craming everything together.  Also, also, I can more easily see what exact command I am sending throughout my code.

Note3: Each commandValue string has a "|" separator character as well as a trailing "|".  The trailing "|" character is required so the plugin can parse the correct number of text strings up to this trailing "|" character only.  As a result, if we expand a commandValue string for a particular command in the future then this will not affect the current released plugins at all since they will simply ignore the extra text we added to the commandValue string.

Note4: I do not believe the plugin needs to know what commands are supported by specific jukebox software.  Based on the generic commands listed, I believe the plugin can decide what they want to implement or not. 



CONFIGURE COMMAND
---------------------------------------------------------------------------
JUKE_PLUGIN_CONFIGURE
null


APPLICATION COMMANDS
---------------------------------------------------------------------------
JUKE_APP_OPENED
null

JUKE_APP_CLOSED
null



CURRENT PLAYING SONG COMMANDS
---------------------------------------------------------------------------
JUKE_SONG_START (new song has started playing)
name|artist|album|albumNum|trackNum|genre|totalDuration|

JUKE_SONG_FINISH (current song has finished)
null

JUKE_SONG_RESTART (current song has been restarted)
null

JUKE_SONG_SKIP (current song has been skipped)
null

JUKE_SONG_PAUSE (current song has been paused)
null

JUKE_SONG_RESUME (current song has been resumed from pause state)
null

JUKE_SONG_FASTFWD_START (current song has started being fast forwarded)
null

JUKE_SONG_FASTFWD_FINISH (current song has finished being fast forwarded)
null

JUKE_SONG_FASTREV_START (current song has started being fast reversed)
null

JUKE_SONG_FASTREV_FINISH (current song has finished being fast reversed)
null

JUKE_SONG_PLAY_POSITION (the number of seconds into the current song)
curPosSecs|totalDuration|



QUEUE COMMANDS
---------------------------------------------------------------------------
JUKE_QUEUE_ADD_SONG (song added to queue by user or system)
system|queuePosNum|name|artist|album|albumNum|trackNum|genre|totalDuration|

JUKE_QUEUE_REMOVE_SONG (song removed from queue by user or system)
system|queuePosNum|

JUKE_QUEUE_MOVE_SONG (song has been moved in the queue by user or system)
system|oldQueuePosNum|newQueuePosNum|

JUKE_QUEUE_CLEARED (the song queue has been cleared by user or system)
system|

JUKE_QUEUE_CHANGED (the song "queue.txt" file has changed)
null




VOLUME COMMANDS
---------------------------------------------------------------------------
JUKE_VOLUME_CHANGE (volume has been changed by user or system)
system|up/down|curVolumeLevel|minVolumeLevel|maxVolumeLevel|

JUKE_VOLUME_MUTE (volume mute has been turned on/off)
on/off|



ENTER DIGIT COMMANDS
---------------------------------------------------------------------------
JUKE_ENTER_ALBUM_NUM_DIGIT (album number digit has been entered)
digit(0-9)|

JUKE_ENTER_TRACK_NUM_DIGIT (track number digit has been entered)
digit(0-9)|



FEATURE COMMANDS
---------------------------------------------------------------------------
JUKE_FEATURE_ATTRACT_MODE (attract mode feature is enabled/disabled)
active/notActive|

JUKE_FEATURE_PARTY_LOCK (party lock feature is enabled/disabled)
enabled/disabled|



NAVIGATION COMMANDS
---------------------------------------------------------------------------
JUKE_NAVIGATE_QUEUE (navigating song queue is occurring)
up/down/left/right|

JUKE_NAVIGATE_ALBUM_TRACK_LIST (navigating album track list is occurring)
up/down/left/right|

JUKE_NAVIGATE_ALBUM_COVER_PAGE (going to next album cover page)
up/down/left/right|

JUKE_NAVIGATE_ALBUM_COVER_SELECT (selecting an album cover on current page)
null

JUKE_NAVIGATE_PLAYLIST (navigating playlists are occurring)
up/down/left/right|

JUKE_NAVIGATE_PLAYLIST_TRACK_LIST (navigating playlist tracks are occurring)
up/down/left/right|

Space Fractal:
Hehe, I use Pure Basic to creating dlls, not Power Basic. Pure Basic is a powerfull api.

We could define a basic standard command sets we know all software have, but still been available to use commandsend argument to send extra unique commands trouch Juke_Config(), like these action buttons?

I think I doesent want to explain what these action buttons does, if I have full controls over that used using comandSend(), but I could use the above to doing that.

I create a full plug-in example using these commands later, today or tomorrow (using the sound example).

I looking about Queue.txt later, but by now get the other things work first !!


These commands does not exists is mine software, instead they can been used to send as extra commands like I said above, using commandlist$:

 JUKE_QUEUE_USER_MOVE_SONG
 JUKE_SONG_FASTFWD_START
 JUKE_SONG_FASTFWD_FINISH
 JUKE_SONG_FASTREV_START
 JUKE_SONG_FASTREV_FINISH
 JUKE_SONG_PLAY_POSITION

JUKE_SONG_START does not need any argument about songinfo.. allready got it using queue.txt or such that?

QUEUE:
 JUKE_QUEUE_CHANGED
 JUKE_QUEUE_CLEARED

these are all as needed for the plugin to know the queue is changed.. Extra commands should then removed and goes as extra unique commands intead.


 JUKE_SYSTEM_VOLUME_CHANGE and JUKE_USER_VOLUME_CHANGE can been joined into one command:
 JUKE_VOLUME_CHANGE?

  Does the plug need that info, if it system or user that changed to volume?

ENTER DIGIT COMMANDS:
 only used in MultiJuke in Jukebox GUI. I think it should been removed and use them as a extra unique commands?


FEATURE:
 JUKE_FEATURE_PARTY_LOCK is not standard of all software. again, can use as sending to commandlist$ as extra commands to the plugin?


JUKE_QUEUE_CHANGED can also been used as a command as seen..

NAVIGATION:
I haven't have any of these commands.

These commands should been removede from the default sets, but istead using commandsend$ as extra unique commands?

unclet:
headkaze
About the two way communication thing....... I assumed the plugin would be able to send a command to the jukebox software.  For instance, if the plugin wanted to skip the current playing song then the plugin could send a "JUKE_SONG_SKIP" command to the jukebox software. 

I am not sure how you recommendation of a timer would work.   When the plugin wants to inform the jukebox to skip the current playing song, then what does the plugin need to do?  Does the plugin have to somehow remember that a "skip request" should be sent, so when the jukebox's 200ms timer expires and it sends a "JUKE_READ_INPUT" command to the plugin then the plugin can then return the "skip text"?  This sounds odd, so please explain how this would work from the plugin side please.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version