SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-25-2009, 09:49 AM
Gog Gog is offline
Sage Advanced User
 
Join Date: Oct 2004
Location: Montreal, Canada
Posts: 97
overloading the mute behavior

Hi

Disclaimer:I'm a totally new to studio.
What I'm hoping for is to trigger the execution of an external command every time mute is turned on or off.

A bit of background: I use Sonos for the audio output of one of my HD200. Sonos doesn't have an "off" so the only way I have to power down the amp (I use a ZP100) is to either stop the audio play (which I can't do in "line-in" mode) or mute the zone.

There is a simple command tool, zpcmd.exe, that should allow me to do that but I need to trigger that with the mute/unmute events

Now I found the mute check in the OSD, IsMuted(), that's checked to set the color of the volume icon and the call to SetMute(!IsMuted()) and I'm betting I could add a few bits there to call zpcmd.exe. The problem is that I think I'd have to do those changes to every screen and I'd end up with something completely unportable.

There must be a better way to do this...

thanks

Mathieu
Reply With Quote
  #2  
Old 09-25-2009, 01:13 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Gog View Post
Hi

Disclaimer:I'm a totally new to studio.
What I'm hoping for is to trigger the execution of an external command every time mute is turned on or off.

A bit of background: I use Sonos for the audio output of one of my HD200. Sonos doesn't have an "off" so the only way I have to power down the amp (I use a ZP100) is to either stop the audio play (which I can't do in "line-in" mode) or mute the zone.

There is a simple command tool, zpcmd.exe, that should allow me to do that but I need to trigger that with the mute/unmute events

Now I found the mute check in the OSD, IsMuted(), that's checked to set the color of the volume icon and the call to SetMute(!IsMuted()) and I'm betting I could add a few bits there to call zpcmd.exe. The problem is that I think I'd have to do those changes to every screen and I'd end up with something completely unportable.

There must be a better way to do this...

thanks

Mathieu
Gog,

I would do this in java myself if you want some help I would be happy to lend a hand.
Reply With Quote
  #3  
Old 09-25-2009, 01:30 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Dropping into Java seems like overkill for this. It shouldn't take more than a line or two of code at each Mute listener (of which there are only a couple in the stock STV).

My advice would be to start by reading through the Studio user guide and working the tutorials, with special attention to the sections on Listeners.
__________________
-- Greg
Reply With Quote
  #4  
Old 09-25-2009, 01:46 PM
Gog Gog is offline
Sage Advanced User
 
Join Date: Oct 2004
Location: Montreal, Canada
Posts: 97
I don't really mind going the studio way but I use SageMC and SMW and I'd rather not have sound at all than dropping any of these

Plucky, am I to understand that going through java would allow the change to apply to each "mute" call ?
Reply With Quote
  #5  
Old 09-25-2009, 02:01 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Gog View Post
Plucky, am I to understand that going through java would allow the change to apply to each "mute" call ?
I don't know what Plucky has in mind, but I don't see how Java is going to help with that. You'd still need to trigger off of the Mute listeners in the STV.

Having found those listeners, you wouldn't have to copy and paste identical code to each one. You could write the code just once, and then paste in a reference to it (sort of like a subroutine call) at each listener, which is a bit cleaner than actually duplicating the code.
__________________
-- Greg
Reply With Quote
  #6  
Old 09-26-2009, 04:59 PM
Gog Gog is offline
Sage Advanced User
 
Join Date: Oct 2004
Location: Montreal, Canada
Posts: 97
Quote:
Originally Posted by GKusnick View Post
I don't know what Plucky has in mind, but I don't see how Java is going to help with that. You'd still need to trigger off of the Mute listeners in the STV.
If I had to take a guess, the java part would be to do the external call...
Reply With Quote
  #7  
Old 09-26-2009, 05:10 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Gog View Post
If I had to take a guess, the java part would be to do the external call...
You can do that from Studio code using the ExecuteProcess() API call. You can also call arbitrary Java methods directly from Studio code without having to drop into a Java environment. (In fact that's how you drop into Java from Studio: you write a custom Java class and call its methods from Studio code. But for a one-liner like this, that shouldn't be necessary.)
__________________
-- Greg
Reply With Quote
  #8  
Old 09-26-2009, 06:21 PM
Gog Gog is offline
Sage Advanced User
 
Join Date: Oct 2004
Location: Montreal, Canada
Posts: 97
Quote:
Originally Posted by GKusnick View Post
You can do that from Studio code using the ExecuteProcess() API call.
Thanks for that bit. My aimless wander of the API doc hadn't found that method yet.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't control audio volume but can mute!? osburnfamily SageTV Software 1 05-13-2008 05:19 AM
CC with Mute marchold SageTV Beta Test Software 1 11-12-2006 08:51 PM
On-screen MUTE-is-Active - prominent? stevech SageTV Software 0 10-16-2006 10:04 PM
SageTV vs MCE: the mute button Vajrakilaya SageTV Software 0 10-07-2006 11:21 PM
Mute problem on PVR 350 with 2.0.15 rak306 SageTV Beta Test Software 9 04-10-2004 10:51 AM


All times are GMT -6. The time now is 06:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.