MacOS – How to turn off the speakers when no sound is being played

macossound-volume

I just bought a wattmeter and realized that my speakers are using 15 Watts on idle.

Is there a way to detect that no sound is being currently played in order to turn off my speakers ?

The system sounds are currently being played by my monitor through HDMI, and the audio output of my Macbook Pro is connected to my speakers through a jack cable. Applications that are likely to play sound are: VLC, iTunes, Chrome.

I didn't want to formulate this question as a XY problem, so I'll just enumerate a few ideas that came to my mind to solve this. I'm open to any kind of solution, high or low level.

Turning off the speakers will most likely be done with a relay controlled with an Arduino.

I don't see any obvious way to detect if sound is being played programmatically, but I would be interested to know if this is possible. Maybe there is a system call that I could use to estimate the current audio level ?

The launching of the screen saver is more or less a good indication that it's time to turn off the speakers. It's probably possible to create a Quartz Composer composition that would be used as a screen saver, and also turn off the speakers when it's starting, but Quartz Composer seems to be dying slowly. Who knows if it will still exist in the next OS X release ?

Also, a totally external hardware solution would be great, maybe some kind of circuit that would detect if sound is currently being played, and activate or deactivate a relay accordingly.

The speakers are these ones:

http://www.amazon.fr/CREATIVE-I-Trigue-L3450-Enceintes-2-1/dp/B0000CD7I8

Here are the specs (in French):

Puissance (Totale) Nominale de Sortie: 48 Watts
Puissance Max de Sortie du Système Audio: 100 Watts
Détails du système haut-parleur: 1 x Caisson de basses 30 Watts, 2 x Haut-parleurs satellite 9 Watts

My cheap Chinese wattmeter reads 11.8 W when idle; the same Chinese wattmeter gives me plausible measures with everything that I have measured so far (from a charging 12W iPad charger to a running 2300W boiler).

Best Answer

You describe the problem as having 11.8 watt on the speakers while there is no sound coming from them. Try using Mute, to make sure no sound output is send to the speakers.

You also say you have 2 sound outputs one to the monitor via HDMI for the system sounds on external monitor the other to your external speakers true the headphone jack.

That is possible but requires special settings in the System Audio or 3D party audio application.

It is not possible to have 11.8 watt (as measured by your wattmeter) of audio power going to speakers without them making any noise, unless the speakers audio amplifier is junk.

It is possible that your speakers draw power because they have defective audio amplifier. I suggest looking in to it or returning the product.