home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
vrac
/
pclcjs.zip
/
SOUNDFN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-01
|
606b
|
23 lines
/* SOUNDER Library Function Copyright 1991 by Chuck Steenburgh */
/* This function sounds a random series of 1-3 tones. The number
of tones actually sounded is returned. */
#include <bios.h>
#include <stdio.h>
int sounder()
{
/* Local variables */
int number, freq[3], counter, length;
srand(51);
number = (rand() % 3);
length = 12 / (number +1);
for (counter = 0; counter <= number; counter++){
freq[counter] = 110 + (110 * (rand() % 10));
sound(freq[counter], length);
}
return(number);
}