Disable Sounds

B

Ben

How can I disable all of the sounds in my application? I want users
to be able to turn sounds on and off only in the game I am working on
without affecting other applications or events.
 
P

Paul G. Tobey [eMVP]

You lost me. You want the sound from other applications to still occur
while your application is running, but you just want that application not to
make any noise? Just do it. If checkbox checked for no sound, don't make
any sound calls. It's got to be deeper than that, but you're going to have
to give more details...

Paul T.
 
B

Ben

My menus make default clicking sounds when I use them.

Also, there are "screen tap" sounds, but I don't care as much about
those.
 
P

Paul G. Tobey [eMVP]

You'd have to turn those off, along with the rest of the OS use of them,
while you are in front, and then turn them back on when you are brought to
the front again. You can't prevent screen clicks, which are handled inside
the OS long before it even cares what application was clicked, if any, from
happening in just your application. If you don't want to do that at a
granular level, just set the volume to 0 when you start and set it back to
its original level when some other application pops up or when you exit. Of
course, the user can always manually turn the sounds back up, but it's
usually a bad idea to undo what he wants to do. If you're worried about
that, you'll have to turn off the sounds for those operations (and hope he
doesn't manually go turn them back on again, of course).

Paul T.
 
B

Ben

I'm not playing any sounds anywhere in my code. They are default
device sounds that are playing.
 
B

Ben

OK. Thanks. I was worried that that was the case. I don't want my
game to mess with the system sounds or sound levels. I'll just let
them use the device's sound settings to do whatever they want. Thanks
for the info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top