Hi, Can any one plz tell me How Can I create Beep sound for 1min continuously.Now I can create Beep sound only once by below code.Eagerly waiting for someone reply. Toolkit.getDefaultToolkit().beep(); Regards Bikash
Here's a another key question when doing this. Is there any way to get Java to turn the audio on in windows and turn up the volume? In my application, we want to make sure the user hears us when we trash talk him for doing something stupid. (Otherwise the user may simply hace the sound off, and not hear it.) --Marek
Joined: Dec 04, 2001
Hi, Thanks for all of ur's help. Thanks & Regards Bikash
Mark, we're talking about the system speaker here... that's what the beep() method sounds. I don't think that you can turn off the system speaker through the control panel. If you want to use real sounds (.WAV sound files or other types), you'll have to use JMF (Java Media Framework), which also gives you a lot more control of playback, and supports most video and sound formats. There isn't a built-in way of turning up the system sound (as far as I know), you'd have to do some kind of JNI to get Windows to control the system sound. But this really seems like overkill... if the user turns sounds off at the system level, that probably means they want sounds off... I'd be pretty mad if I turned sound off and then some stupid program that thought it knew better than me turns sound back on to sound an error message. For example, you could be breaking into a high security facility and using your PDA to hack into the security systems to disable it. You have sounds turned off because you are perched inside an air duct above the guard station. Whoops! You accidently mis-typed a command! The program re-enables system sound to beep at you. You're dead...