home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 15-05.C < prev    next >
Text File  |  1995-01-20  |  735b  |  37 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int voice_array[61];
  10.    int i;
  11.    int volume;
  12.  
  13.    fg_initpm();
  14.    if (fg_testmode(9,0) == 0)
  15.    {
  16.       printf("This program requires a PCjr or ");
  17.       printf("a Tandy 1000 system.\n");
  18.       exit(1);
  19.    }
  20.  
  21.    i = 0;
  22.  
  23.    for (volume = 1; volume <= 15; volume++)
  24.    {
  25.       voice_array[i++] = 1;      /* use channel 1 */
  26.       voice_array[i++] = 500;    /* 500 Hz frequency */
  27.       voice_array[i++] = volume; /* variable volume */
  28.       voice_array[i++] = 16;     /* duration */
  29.    }
  30.    voice_array[i] = 0;
  31.  
  32.    fg_voices(voice_array,1);
  33.  
  34.    while(fg_playing())
  35.       printf("Still playing...\n");
  36. }
  37.