|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
Quote:
I would do this in java myself if you want some help I would be happy to lend a hand. |
#3
|
||||
|
||||
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 |
#4
|
|||
|
|||
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 ? |
#5
|
||||
|
||||
Quote:
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 |
#6
|
|||
|
|||
If I had to take a guess, the java part would be to do the external call...
|
#7
|
||||
|
||||
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 |
#8
|
|||
|
|||
Thanks for that bit. My aimless wander of the API doc hadn't found that method yet.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |