Disable Sound

Is there a way to mute speakers with a console app?  For example, I want to put the program in "Start Up", so each time there is a login, it mutes the speakers and then disappears.  Thanks!

Regards,
Tony
LVL 1
fattumsdadAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Just use

#include <windows.h>
#include <mmsystem.h>

int main () {

    waveOutSetVolume ( 0, 0);

}

and link with winmm.lib
0
 
fattumsdadAuthor Commented:
That would be great...  but I want to do it from console, not using MFC.  Thanks :)

Regards,
Tony
0
 
jkrCommented:
BTW, for more info, see http://support.microsoft.com/default.aspx?scid=kb;en-us;139098 ("How to Use Wave Audio Volume Control APIs")
0
 
fattumsdadAuthor Commented:
Thanks, I'll check that out!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.