home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / turbo_c / sound.arc / EXAMPLE.C next >
Text File  |  1987-06-20  |  648b  |  36 lines

  1.  
  2. /*   Link this file with  SOUND.OBJ  */
  3.  
  4. #include <stdio.h>
  5. #include <sound.h>
  6.  
  7. main() {
  8.  
  9.   int X;
  10.  
  11.   setupdelay();   /* set up the delay counter */
  12.  
  13.   printf("Demonstrating:   delay(),  sound()  and  beep()\n\n");
  14.  
  15.   printf("Pausing for 3/4 second.... NOW!\n");
  16.   delay(75);
  17.   printf("Pausing for 2.25 seconds... NOW!\n");
  18.   delay(225);
  19.  
  20.   printf("\nHere's a Tone of 1000hz for 1 second...\n");
  21.   sound(1000,100);
  22.   delay(100);
  23.  
  24.   printf("Here's a BEEP...\n");
  25.   beep();
  26.   delay(100);
  27.  
  28.   printf("Here's a WARBLE...\n");
  29.   for (X=6; X; X--) {
  30.     sound(880,5);
  31.     sound(440,5);
  32.   }
  33.  
  34.   printf("All done!\n");
  35. }
  36.