01-11-2009
|
#1
|
|
Last Online: 05-30-2013
Join Date: Jan 2008
Posts: 1,788
Thanks: 10,018
Thanked 1,100 Times in 651 Posts
Groans: 1
Groaned at 6 Times in 6 Posts
|
Free Patriotic Movement Tone In C++
In my free time, I coded this small program that generates the FPM tone using the beep() function. This is the code:
Code:
//Free Patriotic Movement Tone By Edgard Chammas
#include <windows.h>
#include <time.h>
void sleep(unsigned int mseconds);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
Beep( 750, 200);
Beep( 750, 200);
Beep( 750, 200);
sleep(100);
Beep( 750, 400);
sleep(50);
Beep( 750, 500);
sleep(200);
Beep( 750, 300);
Beep( 750, 300);
Beep( 750, 300);
return 0;
}
void sleep(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
Now your PC can be upgraded to support GMA! 
Note: The compiled executable file is here <> in case you don't have a compiler...
|
|
|