home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / PLAYDEMO.C < prev    next >
C/C++ Source or Header  |  1997-07-05  |  845b  |  41 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  PLAYDEMO.C - demo of background music functions
  5. **
  6. **  public domain by Bob Stout
  7. */
  8.  
  9. #include <stdio.h>
  10. #include "uclock.h"
  11. #include "sound.h"
  12.  
  13. main()
  14. {
  15.       int i;
  16.  
  17.       if (!playb_open(1024))
  18.       {
  19.             puts("\aError opening play buffer");
  20.             return -1;
  21.       }
  22.       playb_note(C3, 8);
  23.       playb_note(REST, 2);
  24.       playb_note(C3, 8);
  25.       playb_note(REST, 2);
  26.       playb_note(E3, 8);
  27.       playb_note(REST, 2);
  28.       playb_note(E3, 8);
  29.       playb_note(REST, 2);
  30.       playb_note(G3, 8);
  31.       playb_note(REST, 2);
  32.       playb_note(G3, 8);
  33.       playb_note(REST, 2);
  34.       playb_note(E3, 18);
  35.       playb_note(REST, 2);
  36.       for (i = 0; i < 500; ++i)
  37.             printf("i = %d\n", i);
  38.       playb_close();
  39.       return 0;
  40. }
  41.