Step 1: What Is Sonar?
Step 2: Putting Sonar on Your PC
Step 3: How to Edit the Source Code
In order to edit and compile it, you'll need a few things first:
- Begin by downloading Visual C++ Express 2008, which Microsoft offers for free.
- Then you also want to download and install wxWidgets version 2.8.10.
- Lastly, you'll need to download PortAudio and extract it to your "sonar_dist" folder using 7zip.
Step 4: Cleaning the Source Code
Step 5: Editing the Source Code
Now go into your "sonar_dist" folder and double click on "sonar.vcproj". You should be able to click on the debug button to launch the sonar program. So now if you want to change what the program does, you can double click on "SysInterface.cpp" and under the "sleep_monitor/platform windows" boolean, you can change the PostMessage to any other c++ command you want. For instance, this command will open up the CD tray:
mciSendString('set CDAudio door open", NULL, 0, NULL);
and this command will open up a website:
ShellExecute(NULL, "open", "http://www.tinkernut.com", NULL, NULL, SW_SHOWNORMAL);
You can view the video above for what the examples look like. Have fun experimenting with this one!