
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>sound() turn speaker on at specified frequency</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
sound() Turn Speaker On at Specified Frequency
#include <dos.h>
void sound(freq);
unsigned freq;
sound() turns the PC's speaker on at 'freq'. 'freq' specifies the
frequency of the sound in Hertz. Call nosound() to turn off the
sound.
Returns: Nothing.
Portability: IBM PC and compatibles only.
-------------------------------- Example ---------------------------------
The following statements turn on a sound then turn it off.
#include <dos.h>
main()
{
sound(4);
delay(500);
nosound();
}
See Also: delay() nosound() sleep()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson