How can I automatically switch audio to my speakers when my TV-as-2nd-monitor is not in use?

3

0

I have a normal LCD monitor as my primary monitor and an HD LCD television as a 2nd monitor (connected through HDMI). I also have a set of normal speakers for the computer (a Windows 7 machine) that I previously used (before I was using the TV as a 2nd monitor). When I am using the TV as a 2nd monitor, I would like audio to come from it. However, I'm oftentimes using the TV as a TV, in which case I would like the audio from my computer to come from my speakers. Is there any way to accomplish this?

It seems that if I have the TV set up as the default audio, then even if I turn the TV off (or, more likely, to the input from my cable box), then the audio still goes through that rather than my speakers. Is there a solution that does not require me to manually change the settings every time I want to switch contexts?

Michael McGowan

Posted 2012-09-01T00:01:03.267

Reputation: 647

Answers

2

This actually should be possible with some scripting or coding.

There is a WMI Win32_DesktopMonitor class that has an property called "Availability."

The availability property lists 17 possible states the monitor can be in. You will probably want want to check for the value of 0x03 (Running or Full Power). However, you would have to play with the returning values from your TV to see what is best.

With this in mind you can then change the default sound device, also available through scripting/coding. See this example.

So a program/script can be made to monitor the state of the TV and switch sound devices as necessary. However, it would definitely require some effort on your end to write it for your hardware.

Keltari

Posted 2012-09-01T00:01:03.267

Reputation: 57 019

1

There are some HDTV/Video card combinations that will tell the computer "I'm not watching you anymore", and then Windows could switch back. I am going to assume from your setup, that this is not the case.

For an automated way, that would be the way to go; unfortunately, I don't know off the top of my head which TVs and GFX cards will do that.

The next best solution is to create a shortcut on your taskbar, so you can press Windows+1 or Windows+2 to switch the audio. To create this shortcut though, you would need to track down where in the registry Windows stores the Audio Output Device, and export that entry to a new file. Do the same when it's connected to your TV. I unfortunately do not know where Windows stores that information though, so it would be up to another question or another user to explain how.

Canadian Luke

Posted 2012-09-01T00:01:03.267

Reputation: 22 162

As far as I know, all devices have to be HDMI v3 to detect/change power states. – Keltari – 2012-09-10T17:25:49.533

0

My set up works, however, every time I plug in a new monitor or set something up, I have to pay with it to get it working properly again, and up until now, I was never sure how I got it right.

My current set up is on the Intel Graphics and Media Control panel- or whatever similar set up interface you have. I have two modes, one for TV Time and one for Normal use.

Fist I set up option one, which is saved as "TV Time", I have the monitor set to clone displays at the TV's resolution. Under audio (Playback Devices), I have the TV set as the default device. So when "TV Time" mode is selected, video goes to HDMI and audio is going to TV automatically.

I set up my primary mode secondly and saved it as "Normal Mode". Normal use is set to single display, and the correct monitor resolution, and Monitor as Primary display. So when you switch to "Normal Mode" it shuts off the HDMI and then in Sound, it no longer has the TV as an audio option, so in Sound (Playback devices) options, "Speakers" are set to default audio device.

tropi

Posted 2012-09-01T00:01:03.267

Reputation: 1