Borland C++ reference

sound

raw OCR

Turns PC speaker on at specified frequency.

Defined in header <dos.h>

Syntax

#include <dos.h>
void sound(unsigned  frequency);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

sound turns on the PC's speaker at a given frequency, frequency specifies the frequency of the sound in hertz (cycles per second). To turn the speaker off after a call to sound, call the function nosound.

See also

Example

/* Emits a 440-Hz  tone for 1 seconds. */
#include <dos.h>
int main (void)
{
sound (44
delay (IC
nosound(
return C

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.