home *** CD-ROM | disk | FTP | other *** search
-
- /* Link this file with SOUND.OBJ */
-
- #include <stdio.h>
- #include <sound.h>
-
- main() {
-
- int X;
-
- setupdelay(); /* set up the delay counter */
-
- printf("Demonstrating: delay(), sound() and beep()\n\n");
-
- printf("Pausing for 3/4 second.... NOW!\n");
- delay(75);
- printf("Pausing for 2.25 seconds... NOW!\n");
- delay(225);
-
- printf("\nHere's a Tone of 1000hz for 1 second...\n");
- sound(1000,100);
- delay(100);
-
- printf("Here's a BEEP...\n");
- beep();
- delay(100);
-
- printf("Here's a WARBLE...\n");
- for (X=6; X; X--) {
- sound(880,5);
- sound(440,5);
- }
-
- printf("All done!\n");
- }