INTERACT FORUM

Please login or register.

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

Author Topic: Zone Switch not working correctly?  (Read 2665 times)

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Zone Switch not working correctly?
« on: November 01, 2014, 12:52:14 am »

I've been experiencing some weirdness with Zone Switch lately, so I deleted all of my rules to try and troubleshoot it.
After deleting all my current rules, and using the simplest of rules for switching, it seems that "Stop" rules may not be working at all right now.
 
Two zones:
  • Audio
  • Video

One Zone Switch rule:
  [Media Type]=[Video]
  Play in in this zone: Video
  Stop playback in: Audio
 
 
1.  Play music in the Audio Zone.
2.  Start video playback in the Video Zone with a file which is already in the Playing Now list.
 
Result: both zones try to play, with playback starting and stopping every second.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5177
  • "Linux Merit Badge" Recipient
Re: Zone Switch not working correctly?
« Reply #1 on: November 01, 2014, 07:33:56 am »

It may be that zoneswitch isn't engaging at all because you're trying to play video in the video zone.  A test: create a third zone and repeat your exact experiment, except

1) add the third zone as a stopped zone in your rule and
2) attempt to initiate playback of the video in step 2 from the third zone.

If it still doesn't work, I agree that's a bug; if it works, it may just be that the rule doesn't engage at all when no switching occurs (which isn't necessarily ideal, but gives us something to work with).

A second test: does it work correctly with an additional reciprocal rule (e.g. play all non-video in audio and stop playback in video)?  My experience has been that the stop playback rules only currently fully work as expected when there are reciprocal stop playback rules.  I agree that without reciprocal rules sometimes the zoneswitch results are counter-intuitive/possibly incorrect (I see strange routing behavior without reciprocal rules).  However, with reciprocal rules, everything always works correctly for me.  I'd be curious if reciprocal rules work correctly for you.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Zone Switch not working correctly?
« Reply #2 on: November 01, 2014, 07:54:35 am »

It may be that zoneswitch isn't engaging at all because you're trying to play video in the video zone.
I suspect that is what's happening, but I think that is also the reason why previous rules were not behaving as intended.
 
E.g. my rule to route IPC (audio from the WDM driver) worked correctly in certain zones, but in other zones the rule was skipped over and it was directed to a different zone instead. (one keyed off Media Type = Audio, rather than the higher priority Filename begins with live://ipc)

A test: create a third zone and repeat your exact experiment, except

1) add the third zone as a stopped zone in your rule and
2) attempt to initiate playback of the video in step 2 from the third zone.

If it still doesn't work, I agree that's a bug; if it works, it may just be that the rule doesn't engage at all when no switching occurs (which isn't necessarily ideal, but gives us something to work with).
It seems that playback which is started from an item that already exists the Playing Now list, does not trigger Zone Switch.
 
If I double-click a file in the library to play it, Zone Switch rules do get applied correctly as far as I can tell, no matter what zone is active.
If I start playback by double-clicking an item which is already in a Playing Now list, it results in these conflicts.
 
I wouldn't expect the files to get routed anywhere if they did not belong in that zone for whatever reason, but I would expect the stop rules to still be triggered.

A second test: does it work correctly with an additional reciprocal rule (e.g. play all non-video in audio and stop playback in video)?  My experience has been that the stop playback rules only currently fully work as expected when there are reciprocal stop playback rules.  I agree that without reciprocal rules sometimes the zoneswitch results are counter-intuitive/possibly incorrect (I see strange routing behavior without reciprocal rules).  However, with reciprocal rules, everything always works correctly for me.  I'd be curious if reciprocal rules work correctly for you.
I believe that will work, but this is where it becomes problematic.
I found that if I had my IPC rule stop playback in all other zones, it did work as expected.
However it was not actually stopping playback in those zones, and it should not have had stop rules for the zones which played to different audio devices. (because I don't want Windows audio to interrupt all playback in all zones)
 
That's why I'm trying to get to the root of what isn't working correctly, with as few zones/rules as possible.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5177
  • "Linux Merit Badge" Recipient
Re: Zone Switch not working correctly?
« Reply #3 on: November 01, 2014, 05:33:01 pm »

I believe that will work, but this is where it becomes problematic.
I found that if I had my IPC rule stop playback in all other zones, it did work as expected.
However it was not actually stopping playback in those zones, and it should not have had stop rules for the zones which played to different audio devices. (because I don't want Windows audio to interrupt all playback in all zones)

I can tell you that I have a loopback zone with reciprocal stop playbacks with two other zones and if something is already playing in a non-loopback, system sounds (or browser sounds) don't interrupt playback for me.  I assume you tried it and it didn't work that way for you?  Not sure if it's a quirk of my device/ASIO driver or what.

It's kind of odd; the WDM input never disturbs active playback for me (even with mutual stop rules as noted), but it will blow right through something paused.  It seems to respect active playback, but a pause may as well be a stop as far as its concerned.

 
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Zone Switch not working correctly?
« Reply #4 on: November 01, 2014, 11:19:45 pm »

I haven't either, but it doesn't make sense that the rule needs a stop command assigned to devices it isn't even playing to, for it to do anything.
 
But I'd rather focus on getting the stop rule to work correctly when playback is started from Playing Now first.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5177
  • "Linux Merit Badge" Recipient
Re: Zone Switch not working correctly?
« Reply #5 on: November 02, 2014, 06:45:10 am »

I haven't either, but it doesn't make sense that the rule needs a stop command assigned to devices it isn't even playing to, for it to do anything.

I wasn't saying it made sense, I'm saying that the only way to get it to work as expected (for me) is with reciprocal stop playbacks.

My experience has been that stop playback rules do not work correctly without a closed loop;  zoneswitch will only switch in one direction (if at all) with a rule like you setup.  I agree that isn't necessarily desired behavior, I'm just sharing my observations.


Quote
But I'd rather focus on getting the stop rule to work correctly when playback is started from Playing Now first.

I'm pretty sure zoneswitch doesn't work/never worked on items already in playing now.  The way the rules work is by directing things from library views to the playing now of the correct zone.  Things already in a given zone's playing now don't get redirected, otherwise zoneswitch: could work within a playlist (and it does not).  I'm pretty sure Matt previously confirmed that once it's in playing now zoneswitch doesn't engage.  And if zoneswitch doesn't engage, the stop playback rules won't either.

EDIT: found it:

Also, if you double-click in Playing Now (which is a specific zone), it will always play in that zone.

It looks like you and MrC were having this same conversation in that thread.  That thread is a good sketch of the limitations of the feature.

On a side note a big number of the contributors to that thread aren't active anymore.  I've missed seeing MrC around here, he's been disappeared for nearly 6 months.  It always makes me anxious when smart prolific folks start disappearing from forum communities; don't you go disappearing now  ;D
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Zone Switch not working correctly?
« Reply #6 on: November 02, 2014, 07:16:23 am »

I wasn't saying it made sense, I'm saying that the only way to get it to work as expected (for me) is with reciprocal stop playbacks.
With the IPC rule, here's a clearer example of what's happening:
 
Zones:
  • Music (USB DAC)
  • IPC (USB DAC)
  • Multichannel (HDMI AVR)

Zones 1 & 2 share the same device. Zone 3 plays to a completely separate device.
If I'm playing Music in Zone 1, and IPC starts, the music is stopped and it's sent to Zone 2.
 
If Zone 2 is currently active, IPC plays in Zone 2.
 
If Zone 3 is currently active, the IPC rule is bypassed, and it follows a lower priority rule (Media Type = Audio) that sends it to Zone 1 instead.
The only way for the IPC rule to work, is to have the IPC rule stop playback in Zone 3 as well.
 
But why would I want to stop playback on the AVR, when the audio is being routed to the DAC?
 
And the reason that I want IPC routed to a separate zone, before anyone asks, is so that it doesn't clear the current music playlist. (that's also why I use separate zones for audio and video for example)

I'm pretty sure zoneswitch doesn't work/never worked on items already in playing now.  The way the rules work is by directing things from library views to the playing now of the correct zone.  Things already in a given zone's playing now don't get redirected, otherwise zoneswitch: could work within a playlist (and it does not).  I'm pretty sure Matt previously confirmed that once it's in playing now zoneswitch doesn't engage.  And if zoneswitch doesn't engage, the stop playback rules won't either.
Yes, but stop rules should, or else it results in a conflict.
This particular issue is nothing new, it's just that I've spent a bit of time with Zone Switch again as it's gone from being an annoyance to a frustration again, trying to get these IPC rules to work.
 
So that's not what has been causing my issues with the WDM driver - that will require more investigation - but at least I've got to the root of what's been causing at least some of my Zone Switch troubles.
 
I'm not suggesting that the full Zone Switch rules take effect when playback is started in Playing Now, but the Stop rules should.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5177
  • "Linux Merit Badge" Recipient
Re: Zone Switch not working correctly?
« Reply #7 on: November 02, 2014, 07:29:55 am »

If Zone 3 is currently active, the IPC rule is bypassed, and it follows a lower priority rule (Media Type = Audio) that sends it to Zone 1 instead.
The only way for the IPC rule to work, is to have the IPC rule stop playback in Zone 3 as well.
 
But why would I want to stop playback on the AVR, when the audio is being routed to the DAC?

I see the same behavior; I'm not saying it's ideal, but I can confirm that you're not seeing anomalous behavior.  Stop playback rules don't always work as expected if there aren't mutual stop playbacks.  

I'm pretty sure what the logic does is looks at whether the current zone is set to be stopped by any rules; if so those rules are evaluated; if not, the rules are not evaluated and the next rule is checked.  That makes combining global rules with stop playback rules difficult/impossible because any rules that stop playback in a zone will be evaluated before any global rules.  It's kind of wonky and leads to counter-intuitive results when some rules have stop playback rules, but all zones don't have mutual stop playbacks.  

To be clear, i'm not endorsing the status quo, just describing the state of the function so you don't waste time trying to "fix" something on your end.

Quote
And the reason that I want IPC routed to a separate zone, before anyone asks, is so that it doesn't clear the current music playlist. (that's also why I use separate zones for audio and video for example)

Routing IPC to a separate zone is important for a lot of reasons, you'll get no argument from me on that.  Streaming video inside JRiver doesn't work at all without it.

Quote
Yes, but stop rules should, or else it results in a conflict.
This particular issue is nothing new, it's just that I've spent a bit of time with Zone Switch again as it's gone from being an annoyance to a frustration again, trying to get these IPC rules to work.
 
So that's not what has been causing my issues with the WDM driver - that will require more investigation - but at least I've got to the root of what's been causing at least some of my Zone Switch troubles.
 
I'm not suggesting that the full Zone Switch rules take effect when playback is started in Playing Now, but the Stop rules should.

I can see why that woul dbe desirable; if it's important to you you should lobby for it.  I just wanted to make sure you knew it wasn't "supposed" to be working that way at the moment.
Logged
Pages: [1]   Go Up