INTERACT FORUM
Windows => JRiver Media Center 33 for Windows => Topic started by: datdude on October 15, 2024, 09:45:26 am
-
I may be misunderstanding how the MCC Commands works with parameters and zones. Whenever I use the MCC_PLAY_PAUSE command using the syntax of 1000,0:0 to ONLY play or pause zone 0, if I am currently viewing a different zone via the GUI (either standard view or theater view), such as zone 1, that command will play/pause zone 1 instead of zone 0. I'm clearly doing something wrong. Can anyone help with this?
Thanks!
-
The notes in MCCommands.h might help about issuing to a specific zone:
///////////////////////////////////////////////////////////////////////////////
// Playback (range 10,000 to 20,000)
//
// To issue playback commands to a specific zone, mask these values with the parameter:
// Current Zone: 0
// Zone Index 0: 16777216 (or 0x1000000 hex)
// Zone Index 1: 33554432 (or 0x2000000 hex)
// Zone Index 2: 50331648 (or 0x3000000 hex)
// Zone Index 3: 67108864 (or 0x4000000 hex)
// Zone Index 4: 83886080 (or 0x5000000 hex)
// Zone Index 5: 100663296 (or 0x6000000 hex)
// etc... (keep adding 16777216 (or 2^24)) (up to Zone Index 31)
//
// for the geeks, this is the top 6 bits of the 32-bit parameter
// the lower 24 bits are used for the rest of the parameter (see the C++ macros below if you like)
// if bit 32 is set, we assume someone passed in a simple negative number, so discard the zone portion
//
// for parameters >= 0: zone number + parameter
// for parameters < 0: zone number + (16777216 + parameter)
// example: parameter -1 to zone 3: 67108864 + (16777216 + -1) = 83886079
///////////////////////////////////////////////////////////////////////////////
-
Matt, how to differentiate between "current zone" and "zone 0" using the new syntax (MCC code,arg:zone) ?
The documentation is not clear on that - zones are 0-based, but 0 is also the "default zone"...
Zone | Old syntax | New syntax |
default | mc33 /MCC 10000,0 | mc33 /MCC 10000,0:0 |
0 | mc33 /MCC 10000,16777216 | mc33 /MCC 10000,0:0 |
1 | mc33 /MCC 10000,33554432 | mc33 /MCC 10000,0:1 |
-
It's using the zone index value. 0 is the first index. To target that zone, use 0x1000000 hex.
It's the order the zones are returned from the MCWS Playback/Zones command.
We could add a function to return the zone index from a zone ID if people would find it useful.
-
So that explains the OP's issue, I think.
MCC 10000,0:0 - applies to default/current zone
MCC 10000,0:1 - applies to zone 0 (the first zone)
These are then the correct values?
Zone | Old syntax | New syntax |
current | mc33 /MCC 10000,0 | mc33 /MCC 10000,0:0 |
0 | mc33 /MCC 10000,16777216 | mc33 /MCC 10000,0:1 |
1 | mc33 /MCC 10000,33554432 | mc33 /MCC 10000,0:2 |
-
The launcher does accept param commands in this format:
[value]:[zone]
And all that does is add the top six bits like the note says:
#define MAKE_MCC_PLAYBACK_PARAM(PARAM, ZONE_INDEX) (((ZONE_INDEX) == -1) ? ((PARAM) & 0x00FFFFFF) : ((((ZONE_INDEX) + 1) << 24) & 0xFF000000) | ((PARAM) & 0x00FFFFFF))
-
I think you would want [value]:-1 for the default zone. But that's the same as just not specifying a zone I think.
-
I think you would want [value]:-1 for the default zone.
Right, I see your code is adding +1 to the specified zone. So actually it's not possible with that code to target zone 0, it's either -1 or 1. Isn't that a bug?
-
Right, I see your code is adding +1 to the specified zone. So actually it's not possible with that code to target zone 0, it's either -1 or 1. Isn't that a bug?
Targetting zone zero should work.
MAKE_MCC_PLAYBACK_PARAM(0, 0)
Outputs:
16777216
If you look at the notes I posted:
Zone Index 0: 16777216 (or 0x1000000 hex)
-
0:-1 -> adds 0x00FFFFFF (default? zone 0?)
0:0 -> adds 0x1000000, which is zone index 0 (zone 1?)
0:1 -> adds 0x2000000, which is zone index 1 (zone 2?)
I don't see a way of specifying 0x00000000 using this syntax.
Is there a "zone 0" or do zone numbers start at 1? Is zone 0 always the current zone? It's a bit confusing.
-
0:0 -> adds 0x1000000, which is zone 1
From the note I posted above:
// Zone Index 0: 16777216 (or 0x1000000 hex)
-
But the op is seeing 0:0 as affecting the current zone, even if that's not zone 1.
-
I'm seeing this route to zone index 0 for me:
mc33.exe /MCC 10000,0:0
-
> if I am currently viewing a different zone via the GUI
As soon as you "view" a different zone in the GUI, it becomes the "current zone".
-
> if I am currently viewing a different zone via the GUI
As soon as you "view" a different zone in the GUI, it becomes the "current zone".
Yes, but OP is saying that "mc33.exe /MCC 10000,0:0" is routing to the current zone instead of zone 0 as it should.
-
Yes, but OP is saying that "mc33.exe /MCC 10000,0:0" is routing to the current zone instead of zone 0 as it should.
I was testing that exact thing and it was working nicely. So we need more details from the OP to get to the bottom of it.
-
Sorry for the late reply. I just tested the 10000,0:0 syntax again and it is working now. I had a command saved in eventghost with that syntax so the only thing that changed was a reboot of windows at some point. It definitely was not working no matter what combination of numbers I tried for about an hour and then I gave up until I tried it again just now. Sorry for the troubles. Thanks for looking int it guys.