Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where's the Beep?

Status
Not open for further replies.

icrf

Programmer
Dec 4, 2001
1,300
US
Somewhere in the tree of windows.h there's a function called "Beep()" that takes a pair of longs, first being the frequency, second being duration (in milliseconds) for output to the PC speaker. I suppose my question comes two ways. First, which sub-header file is this function in so I might look at how it's done. Second, the end goal is to do this in linux, so is there already something that does this in the gcc libraries?

Thanks for your help. ----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
There is a beep() call under curses.h in Linux but it doesn't take any parameters at all, it just beeps!

Sometimes you can get the same result by outputting hex 0x07 to the screen (ASCII BEL character) using printf or whatever (there is a \a mnemonic for this).
 
As for the header, it appears to be in Winbase.h, but unless Microsoft's version of "bool Beep( long, long );" tells you more than you already know, I wouldn't bother looking it up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top