home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / PROGRAMM / BLAST13.ZIP / VROOMDRT.C < prev   
C/C++ Source or Header  |  1991-07-11  |  733b  |  41 lines

  1. #include <dos.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include "direct.h"
  5. #include "blaster.h"
  6.  
  7. status_type    voice_stat;
  8.  
  9. void main()
  10. {
  11.  
  12.     /* The delay value can be selected from the command line, speeds
  13.        WILL vary machine to machine, so start trying numbers!
  14.     */
  15.  
  16.     int        loop,delay=50;
  17.     char        *snd;
  18.  
  19.     if(reset_dsp()!=SBOK)
  20.     {
  21.         printf("\nError resetting Sound Blaster.\n");
  22.         exit(1);
  23.     }
  24.     if (load_snd("c:\\temp\\vroom.voc",(sbvoc_type*)&snd)!=SBOK)
  25.     {    
  26.         printf("\nError loading file.\n");
  27.         exit(1);
  28.     }
  29.     if(_argc==2)
  30.         delay=atoi(_argv[1]);
  31.     speaker_on();
  32.     for(loop=0;loop<14312;loop++)
  33.     {
  34.         write_data((int)snd[loop]);
  35.         asmdelay(delay);
  36.     }
  37.     speaker_off();
  38.     unload_snd(snd);
  39.     exit(0);
  40. }
  41.