home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / C / SOUNDPRO / SOUND2.C < prev   
Encoding:
C/C++ Source or Header  |  1995-05-13  |  762 b   |  31 lines

  1. /* The following includes are included in the obj file:
  2.  
  3.         stdio.h
  4.         stdlib.h
  5.         conio.h
  6.         ctype.h
  7.         dos.h
  8.  
  9.  They need not be included again.
  10. */
  11.  
  12. #define SOUNDBLASTER 1  //Comment this line out for PC speaker.
  13. main()            //Soundblaster Main
  14.     {
  15.     #ifdef SOUNDBLASTER  //DO NOT USE BOTH SB + SPEAKER, they use the same interrupt and will mess things up!
  16.      SB_initsound();  //SB Pro init
  17.     #else
  18.      initsound();     //Pc Speaker init
  19.     #endif
  20.     play("ABCDEFGabcdefg  "); // A scale.
  21.     play("?{{{{EDCDEE}E{DD}D{EE}E{EDCDEE}E{++DDED--}C   "); //Merrily we roll along
  22.     // You can put anyhting here, and the music will continue to play...
  23.     while(!kbhit())
  24.         {
  25.         printf("This is just some sample code, to show it works");
  26.         }
  27.     stop();
  28.     }
  29.  
  30.  
  31.