PLUGIN_EVENT_APP_EXIT|""
PLUGIN_EVENT_PLAY|""
PLUGIN_EVENT_PAUSE|""
PLUGIN_EVENT_FASTREV|"KEYDOWN KEYUP"
PLUGIN_EVENT_FASTFWD|"KEYDOWN KEYUP"
PLUGIN_EVENT_SKIP|""
PLUGIN_EVENT_VOLUMESET|"NUMBER"
PLUGIN_EVENT_VOLUMEMUTE|"ON OFF"
PLUGIN_EVENT_VOLUMEUP|"KEYDOWN KEYUP"
PLUGIN_EVENT_VOLUMEDOWN|"KEYDOWN KEYUP"
PLUGIN_EVENT_SONGQ_CLEAR|""
PLUGIN_EVENT_SONGQ_REPEAT|"ON OFF"
PLUGIN_EVENT_IDLEPLAY_ACTIVATE|"ON OFF"
PLUGIN_EVENT_ENTERSEL_DIGIT|"NUMBER"
PLUGIN_EVENT_ENTERSEL_CLEAR|""
PLUGIN_EVENT_ENTERSEL_DELETE|""
PLUGIN_EVENT_ENTERSEL_PLAY|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_BACKWARD|""
PLUGIN_EVENT_ALBUM_COVERS_FLIP_FORWARD|""
I have NOT hardcoded any events, because you defined these events using PLUGIN_EVENT_CREATE, where the remote got them all CORRECTLY.I guess I still have no idea how your plugin knows which events do what .... Say I defined the following events
For some reason KEYDOWN and KEYUP did not used in these VOLUMEUP and VOLUMEDOWN commands, since it dosent look like a button, but might you might have used ""ENABLE DISABLE" instead?In my software when you press the volume down button and keep it pressed down (ie: keyDown), then the volume level decreases. When you finally let go of the button (ie: keyUp) then the volume stops changing. When you press the volume up button and keep it pressed down (ie: keyDown), then the volume level increases. When you finally let go of the button (ie: keyUp) then the volume stops changing. Since this is how my software works, then the plugin can simply tell me "keyDown" or "keyUp" like I currently have defined. Using "enable" and "disable" does not make sense here because the "enable/disable" text are used for enabling and disabling a "feature" and increasing/decreasing the volume is not a "feature" .... it is something which is always available in my software to update.
The main reason you didn't get a _GET correctly back, because I allways close any commands with "", as stated in the document API (hence why I marked them blue). Also I have sendt this back example for the VOLUMEMUTE event (if the button say OFF):
valid: PLUGIN_EVENT_VOLUMEMUTE|"ON"
not: PLUGIN_EVENT_VOLUMEMUTE|ON
So remember to remove any "" it might sendt back to your software before checking. I did that in MultiJuke just to make sure. You should do the same, and the plugin itself do also the same.I am not going to parse out all "" characters ..... the plugin needs to send them without the double-quotes and the SDK API description should be updated if you think it is not clear. Again, normally whenever the "" characters are used .... it indicates a text string should be used ..... but does not mean to include the double-quotes unless specifically indicated that the double-quotes should be also included. it would be a waste of time to parse out all double-quotes from all commands I receive from a plugin .... the plugin should not be sending them in the first place.
Also the The buttons does a NOT change it self, even it send a _GET event back to your software. So make sure your send a _SEND back to the plugin with the new status when a feature is enabled, disabled, on or off or something else.Whenever my software send a GET event to the plugin and the plugin returns a text string, then my software will execute the event provided by the plugin. Executing these events usually result in a JUKE_PLUGIN_EVENT_SEND command to be sent back to the plugin to indicate the change which just took place.
I also recommered you to log the sendt commands back, so you can see what it actuelly sendt back....I do not log a lot of stuff anyways ... just the loading of the library.
QuoteThe main reason you didn't get a _GET correctly back, because I allways close any commands with "", as stated in the document API (hence why I marked them blue). Also I have sendt this back example for the VOLUMEMUTE event (if the button say OFF):Using the "" (double-quotes) in the SDK just indicates that the text after the separator character is a text string, the double-quotes are not meant to be included in the format.
valid: PLUGIN_EVENT_VOLUMEMUTE|"ON"
not: PLUGIN_EVENT_VOLUMEMUTE|ON
The SDK defines the "Juke_Command()" as
Juke_Command(Name:PChar; Value:PChar):PChar;
and does NOT define it as
Juke_Command("Name" :PChar; "Value":PChar):PChar;
Making sure all commands have the "" characters around them and also making sure the parameters have the "" around them is extra work which does not need to be performed.
Think about it ... when I call the Juke_GetPlugInfo() routine, then the text string which is returned does NOT include double-quotes. The name of your plugin is Remote Event Plugin ..... it is NOT "Remote Event PluginQuoteSo remember to remove any "" it might sendt back to your software before checking. I did that in MultiJuke just to make sure. You should do the same, and the plugin itself do also the same.I am not going to parse out all "" characters ..... the plugin needs to send them without the double-quotes and the SDK API description should be updated if you think it is not clear. Again, normally whenever the "" characters are used .... it indicates a text string should be used ..... but does not mean to include the double-quotes unless specifically indicated that the double-quotes should be also included. it would be a waste of time to parse out all double-quotes from all commands I receive from a plugin .... the plugin should not be sending them in the first place.
In MultiJuke and the Plugin. I have NO use of " at ALL, and I just removed them all in my code. Think we should remove ALL " regaardless it a string or number? That because I just can convert the string to a int when needed and when it known its a number value.:applaud:
I created this tool to make sure the comminucation worked correctly, since there was various bugs in MultiJuke as well, why I created this tool (better name for that tool?). I have not even use any hard coded event for get it to work 100% in MultiJuke (it was ideel to log all _GET command using a PRINT command for checking).
Better name for the tool? I are open for a new name.
I release the source code soon.
* Volume Mute: You forgot to send back status back when changed. Hence I can only press Volume Mute OFF, but not Volume Mute ON.I will check this stuff out this weekend.
* Volumeset: Works, but it did never got any changed values back from your software (SEND).
* Entersel Digit: Works, but it did never got Any changed values back from your software (SEND).
* Fastrev + FastFwd - The music begin to sound very choppy (like you pause/unpause constant) instead of fastrev and FastFwd?? It regardless I used the plug-in or not, so it might bee a real bug here? Or in mine version of WMP?Of course the sound seems choppy .... you are fast forwarding (or fast reversing) through the song music .... it is going to sound choppy.
I might could try to insert a value over 100, and the jukebox software should then correct it to maximum to 100 instead just ignore it,Yeah I can look into this as well
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_VOLUMEMUTE= value=ON=
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE= cmdValue=TRUE=
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_ENTERSEL_DIGIT= value=0=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE= cmdValue=0=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE= cmdValue==
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_ENTERSEL_DIGIT= value=2=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE= cmdValue=02=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE= cmdValue==
[hr]
Logged some commands out:
[code]
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|0|0|100
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|38|0|100
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=TRUE
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=FALSE
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE cmdValue=6
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE cmdValue=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE cmdValue=66
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE cmdValue=
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_SONGQ_REPEAT= value=ON
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_SONGQ_REPEAT|ON
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_SONGQ_REPEAT= value=OFF
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_SONGQ_REPEAT|OFF
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|0|0|100
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUMESET cmdValue=0
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|38|0|100
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUMESET cmdValue=38
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=ON
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=OFF
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE cmdValue=6
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE cmdValue=
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_ALBUM_VALUE cmdValue=66
JUKEBOX-->PLUGIN: cmdName=JUKE_ENTER_TRACK_VALUE cmdValue=
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_SONGQ_REPEAT= value=ON
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_SONGQ_REPEAT|ON
PLUGIN-->JUKEBOX: event=PLUGIN_EVENT_SONGQ_REPEAT= value=OFF
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_SONGQ_REPEAT|OFF
[/code]You can not send a TRUE/FALSE because these statement is unknown when define functions using CREATE.The JUKE_VOLUME_MUTE command is NOT created using the JUKE_PLUGIN_CREATE command. The JUKE_VOLUME_MUTE command is defined in the SDK as listed below. This indicates TRUE or FALSE shall be sent. Shall we change the SDK to be ON/OFF instead?
You did do correct with PLUGIN_EVENT_SONGQ_REPEAT. Here you used ON/OFF, and not TRUE/FALSE.This is because the PLUGIN_EVENT_SONGQ_REPEAT event IS defined by the JUKE_PLUGIN_CREATE command where TRUE/FALSE is not allowed to be used.
For the Entersal Digit. Would it not make more sence to define 10 digit commands, one for each number, since it more or less just a KEYCLICK feature just to send back a number?No .... why create 10 commands when one command works fine. Actually it was your idea to simply inform the plugin what the total album number and track number was using one command each. You recommended to just send the complete value all the time and it would be up to the plugin to determine whether a digit was added/deleted or whether all digits were cleared totally. I want to keep this functionality the same.
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|0|0|100There is no command defined in the SDK called "JUKE_VOLUMESET". I defined a jukebox specific event called "PLUGIN_EVENT_VOLUMESET" to allow the plugin to "tell the software" when to set the volume, but I never send a VolumeSet command to the plugin. I send the SDK defined JUKE_VOLUME_CHANGE command instead. No reason to send both. Remember, only commands defined by the SDK can be "sent to the plugin only" but events which are created by the JUKE_PLUGIN_CREATE command can be sent to the plugin and also received from the plugin.
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUMESET cmdValue=0
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_CHANGE cmdValue=0|38|0|100
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUMESET cmdValue=38
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=TRUE
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_VOLUMEMUTE|ON
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=TRUE
JUKEBOX-->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_SEND cmdValue=PLUGIN_EVENT_VOLUMEMUTE|ON
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=TRUE
JUKEBOX->PLUGIN: cmdName=JUKE_PLUGIN_EVENT_GET cmdValue=nullString
PLUGIN->JUKEBOX: event=PLUGIN_EVENT_VOLUMEMUTE value=ON
JUKEBOX-->PLUGIN: cmdName=JUKE_VOLUME_MUTE cmdValue=TRUE
The plugin does NOT checks for the dedicated volume or any other dedicated commandsI think your plugin should make a check.....
So this plugin is to test defined commands ONLY and leave all other commands.Yes, it is only a test plugin and I think it has determined everything works now. If you plugin expects a VOLUMEMUTE ON or OFF value coming from the jukebox software then your plugin will need to check whether it received a JUKE_VOLUME_MUTE (TRUE or FALSE) command and then map it to ON or OFF instead.
If I use FAST FORWORD and FAST REWIND buttons, the sound choppy about 5-6 times and secs sometimes not change. But if I use the slider under Song Queue (Should that not been named Playing Now?), there is no problemo and works as it should.
(Should that not been named Playing Now?),What are you referring to? Are you asking whether I should put a text label next to the song queue slider so the user knows what it is? Anyway, not real sure what you are indicating here for sure ....
I think you should use KEYCLICK and not KEYDOWN/KEYUP (also seen as your software, not plugin) to fix that issue?Fix what issue? The FastForward and FastRewind buttons only work when a KeyDown or KeyUp event is generated. This is how the buttons work .... KeyDown starts the song fast forwarding and KeyUp stops the song from fast forwarding. Same thing for the Fast Reverse. This is why my software requires KEYDOWN and KEYUP in the event from the plugin. I am not sure why you think something is broken and needs to be fixed .... please explain.
The plugin can been found and download from this link:
http://www.jukeplugsys.com/?page_id=9
What does the log file say you are passing to my software?
These are what you should be returning to my software:
PLUGIN_EVENT_VOLUMESET|(NUMBER)
PLUGIN_EVENT_VOLUMEMUTE|ON
PLUGIN_EVENT_VOLUMEMUTE|OFF
The main reason, UncleT Jukebox might send a another command to change a value (VOLUME_SET) and got the JUKE_PLUGIN_GET string deleted. Hence the jukebox software just got a empty stringNot real sure what you are trying to say here. However, it is true that my jukebox software can send the JUKE_VOLUME_CHANGE command to the plugin at any time.
I do hope UncleT add a another JUKE_PLUGIN_GET just before VOLUME_CHANGE command to make sure the plugin actually have a string to return (if any).Not sure what you mean here either.
when you send a JUKE_VOLUME_CHANGE, it automatic changed to a "PLUGIN_EVENT_VOLUMESET" event in the plugin parser code.This seems to be misleading .... plugin authors (like Loadman) are going to think my software sends the plugin a PLUGIN_EVENT_VOLUMESET event but this is not the case. My software sends a JUKE_VOLUME_CHANGE command "to" the plugin and your test app changes it to a PLUGIN_EVENT_VOLUMESET event automatically.
ProcedureDLL.l Juke_Command(Command.l, value.l)
; here goes some convertning code from pointer to string (CommandStringLocal$=Command. EventStringLocal$ = value).
...
...
; First part of the parser
If UCase(EventStringLocal$)="ON" Or UCase(EventStringLocal$)="TRUE"
CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND" : EventStringLocal$=VolumeMute$+"|ON"
EndIf
If UCase(EventString$)="OFF" Or UCase(EventString$)="FALSE"
CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND" : EventStringLocal$=VolumeMute$+"|OFF"
EndIf
EndIf
If CommandStringLocal$="JUKE_VOLUME_CHANGE"
VolumeChange=Val(StringField(EventStringLocal$, 2, "|"))
If VolumeSet$<>""
CommandStringLocal$="JUKE_PLUGIN_EVENT_SEND"
Number$=StringField(EventStringLocal$, 2, "|")
EventStringLocal$=VolumeSet$+"|"+Number$
EndIf
EndIf
; Here I checks for JUKE_PLUGIN_EVENT_SEND and JUKE_PLUGIN_EVENT_GET commands as normal in the plugin.
...