home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / examples / other / sound.c__ < prev    next >
Encoding:
Text File  |  1993-05-12  |  514 b   |  24 lines

  1. /*
  2.    SPHINX C-- example program of C-- sound functions.
  3. */
  4.  
  5.  
  6. ?include "KEYCODES.H--"
  7. ?include "WRITE.H--"
  8. ?include "SOUND.H--"
  9.  
  10. byte intro = "C-- Sound Test\nPress any key for different sounds\n"
  11.              "Press <ESC> when you wish to quit.";
  12.  
  13. word key;
  14.  
  15. main()
  16. {
  17. WRITESTR(#intro);
  18. do {key = @ BIOSREADKEY();
  19.    @ SOUND( key );            /* set frequency to emit from speaker */
  20.    } while( key != k_esc );
  21. @ NOSOUND();                  /* turn off speaker */
  22. }
  23.  
  24. /* end of SOUND.C-- */