home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
prof_c
/
06user
/
tone.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1988-08-11
|
327 b
|
22 lines
/*
* tone -- set the frequency of the sound generator
*/
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
extern void setfreq(unsigned int);
if (argc != 2) {
fprintf(stderr, "Usage: tone hertz\n");
exit(1);
}
/* set the frequency in Hertz */
setfreq(atoi(*++argv));
exit(0);
}