Is there a way to mute all sound coming from my program?
Even when I can't control the part of the program that creates that sound.
Thank you.
Is there a way to mute all sound coming from my program?
Even when I can't control the part of the program that creates that sound.
Thank you.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
I'm guessing that you are refering to the beeps that windows makes in certain circumstances, like when you press enter in an edit box. You can make these sounds stop on a case by case basis, but there is no general API which can silence your application.
As an example, to stop the beep that is given when enter is pressed, handle the WM_CHAR message, and return 0 when wParam is equal to VK_RETURN instead of calling the default procedure.
How about PlaySound() allong with SND_PURGE in the case WM_TIMER every 1 second.
Turn off your speakers or mute your sytem's sound in the control pannel.
I believe the only way to mute all sound is to turn off the speakers. Unless you can figure out how to mute the sound generated by the following ditty:
Code:#include <stdio.h> int main(void) { printf("%c", '\a'); return 0; }
Here's how I would do it:
Devil Panther >> You need to go into more detail regarding what you are looking for here.Code:#include <stdio.h> int main(void) { //printf("%c", '\a'); return 0; }
The only way to turn off the speakers programaticly is to disable them by giving them a bad driver. (I think.)
Well here is the full story, I've used the cwebpage.dll described at this article: http://www.codeguru.com/Cpp/I-N/iepr...icle.php/c4379
The the dll allows me to display a webpage inside my program, using an object.
The application I'm writing displays a web based video camera inside my program's window.
There is also a microphone connected to the same camera so I can hear just by displaying the camera with the dll.
But since the program is meant to run in the background, the sound gets very annoying so I'm looking for a way to mute it on command, when every copy of the program is on it's own; In other words it has to be done locally.
If there is no way to control the sound of my application, can I mute the system, just like I can mute using the "sound control" at the system tray?
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.