home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / examples / gus / gusmod.c__ < prev    next >
Encoding:
Text File  |  1994-02-08  |  1.6 KB  |  58 lines

  1. /*
  2.     NAME:  GUSMOD.C--
  3.     DESCRIPTION:  Demo program for playing Amiga Format MOD files on a Gravis
  4.                   Ultra Sound.  The EURO_MOD.EXE driver must be used with
  5.                   this program.  After compiling, type the following at the
  6.                   DOS prompt to run:
  7.                      EURO_MOD GUSMOD.COM
  8.                   Be sure that the *.MOD data files are found.  No error
  9.                   checking is made, and if the file is not found, the program
  10.                   will crash.
  11.                   This demo will not work on crappy Sound Blasters, get a GUS
  12.                   and find out why Sound Blasters should be scrapped.
  13. */
  14.  
  15. ?parsecommandline  FALSE
  16. ?resize TRUE
  17.  
  18. ?include "KEYCODES.H--"
  19. ?include "WRITE.H--"
  20. ?include "GUSMOD.H--"
  21.  
  22.  
  23. ?define MODFILE "HYPN.MOD"
  24.  
  25. main ()
  26. byte quit;
  27. {
  28. WRITESTR("\nC-- MOD file player demo for Gravis Ultra Sound");
  29. WRITESTR("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n");
  30. WRITESTR("Initializing...\n");
  31. GUS_MOD_INIT();
  32. WRITESTR("Loading MOD File (");
  33. WRITESTR(MODFILE);
  34. WRITESTR(")...\n");
  35. GUS_MOD_LOAD(MODFILE);
  36.  
  37. WRITESTR("MOD file loaded, press any key to start playing\n");
  38. quit = FALSE;
  39.  
  40. do {
  41.     BIOSREADKEY();
  42.     GUS_MOD_PLAY();
  43.     WRITESTR("Playing, press <SPACE> to pause, any other key to stop...\n");
  44.     IF( BIOSREADKEY() == k_space )
  45.         {GUS_MOD_STOP();
  46.         WRITESTR("Paused, press any key to restart...\n");
  47.         }
  48.     ELSE quit = TRUE;
  49.     } while( quit == FALSE );
  50.  
  51. GUS_MOD_STOP();
  52. WRITESTR("Shutting Down.\n");
  53. GUS_MOD_SHUTDOWN();
  54.  
  55. WRITESTR("done.\n");
  56. }
  57.  
  58. /* end of GUSMOD.C-- */