Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play a sound on compile

Compiling (make or build) often takes several seconds or minutes.

I'd like to set up my IDE, RAD Studio XE2, to play a sound when it finishes compiling. Even better if I could set different sounds in case of success or failure in compilation.

like image 683
bluish Avatar asked Mar 12 '13 13:03

bluish


1 Answers

Beep

To get a beep when you're done building, do this:

  1. Go to the project options (ctrl+shift+F11)
  2. Go to Build Events
  3. Go to Post-Build Events/commands
  4. Paste: RunDll32.exe user32.dll,MessageBeep

It uses rundll32.exe to directly call MessageBeep in user32.dll. It's light-weight, and it's pretty sure that it'll work on your system.

Options

Sample

If you want a fancy mp3 you could call winamp, or you can hack something together yourself.

Text-To-Speech

If you're feeling more adventurous, you can let your pc talk to you when it's done building. You don't have to install anything for it; your pc already has SAPI.

The example in the screenshot tells you Done compiling when you're done. You can have let it tell you the build time, the output filename, etc.

Have fun! :-)

Speech

like image 152
Wouter van Nifterick Avatar answered Oct 04 '22 21:10

Wouter van Nifterick