INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone  (Read 561 times)

datdude

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2228

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!
Logged
"You are not a beautiful or unique snowflake." -  Just a very big snowball

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #1 on: October 16, 2024, 10:20:10 am »

The notes in MCCommands.h might help about issuing to a specific zone:
Code: [Select]
    ///////////////////////////////////////////////////////////////////////////////
    // 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
    ///////////////////////////////////////////////////////////////////////////////
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #2 on: October 16, 2024, 12:52:55 pm »

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"...

ZoneOld syntaxNew 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
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #3 on: October 16, 2024, 12:59:44 pm »

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.
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #4 on: October 16, 2024, 01:50:58 pm »

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?

ZoneOld syntaxNew 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
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #5 on: October 16, 2024, 01:58:10 pm »

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))
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #6 on: October 16, 2024, 02:00:43 pm »

I think you would want [value]:-1 for the default zone.  But that's the same as just not specifying a zone I think.
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #7 on: October 16, 2024, 02:02:17 pm »

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?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #8 on: October 16, 2024, 02:05:11 pm »

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)
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #9 on: October 16, 2024, 02:05:29 pm »

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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #10 on: October 16, 2024, 02:08:20 pm »

0:0   -> adds 0x1000000, which is zone 1

From the note I posted above:
// Zone Index 0: 16777216 (or 0x1000000 hex)
Logged
Matt Ashland, JRiver Media Center

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #11 on: October 16, 2024, 02:09:23 pm »

But the op is seeing 0:0 as affecting the current zone, even if that's not zone 1.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #12 on: October 16, 2024, 02:34:26 pm »

I'm seeing this route to zone index 0 for me:
mc33.exe /MCC 10000,0:0
Logged
Matt Ashland, JRiver Media Center

MrBiff

  • World Citizen
  • ***
  • Posts: 151
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #13 on: October 16, 2024, 10:07:47 pm »

>  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".
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #14 on: October 17, 2024, 02:18:31 pm »

>  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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #15 on: October 17, 2024, 02:48:08 pm »

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.
Logged
Matt Ashland, JRiver Media Center

datdude

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2228
Re: Can't get MCC Command MCC_PLAY_PAUSE to only work for a specific Zone
« Reply #16 on: October 18, 2024, 06:17:42 pm »

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.
Logged
"You are not a beautiful or unique snowflake." -  Just a very big snowball
Pages: [1]   Go Up