home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / digmid / real / midpak.h < prev    next >
C/C++ Source or Header  |  1994-01-03  |  6KB  |  114 lines

  1. /*****************************************************************************/
  2. /* MIDPAK.H     C prototype header for API MIDPAK link layer interface                 */
  3. /*                        MIDPAK.ASM.  Because MIDPAK is a real-mode program all                 */
  4. /*                        addresses passed must be in the first 1mb of address space.      */
  5. /*                                                                                                                                                     */
  6. /*                        See MIDPKAPI.DOC for complete MIDPAK documentation.                      */
  7. /*                                                                                                                                                     */
  8. /*        Written by John W. Ratcliff (c) 1994                                                                     */
  9. /*             Compuserve: 70253,3237                                                                                          */
  10. /*             Genie: J.RATCLIFF3                                                                                                  */
  11. /*             BBS: 1-314-939-0200                                                                                                 */
  12. /*             Addresss:                                                                                                                     */
  13. /*                     747 Napa Lane                                                                                                     */
  14. /*                     St. Charles, MO 63304                                                                                     */
  15. /*                                                                                                                                                     */
  16. /*        A $500 per product license fee applies to all commercial software          */
  17. /*        products distributed with ANY MIDPAK drivers.                                                  */
  18. /*                                                                                                                                                     */
  19. /*        To pay a license, simply write a check for $500 payable to                         */
  20. /*                The Audio Solution, 747 Napa Lane, St. Charles, MO 63304                     */
  21. /*                with a copy of your commerical product.  You will receive a signed */
  22. /*                license agreement from The Audio Solution shortly thereafter.          */
  23. /*                This license fee applies specifically to the inclusion with your     */
  24. /*                distribution disk any of the MIDPAK drivers from The Audio Solution*/
  25. /*                These drivers are copyrighted works, created by me, to enhance the */
  26. /*                use of sound and music in DOS based commercial software.    The          */
  27. /*                license fees collected are used to maintain the drivers and keep     */
  28. /*                the BBS running.    There is a seperate license fee for the use          */
  29. /*                and distribution of DIGPAK drivers.                                                              */
  30. /*                                                                                                                                                     */
  31. /*                See accompaning documentation regarding license fees for DIGPAK      */
  32. /*                distribution.  You would be ill-advised to distribute a commercial */
  33. /*                product containing either DIGPAK and/or MIDPAK drivers without         */
  34. /*                having paid the distribution license fee.  Since your product would*/
  35. /*                contain unlicensed copyrighted software from The Audio Solution,     */
  36. /*                your product could be required to be immediately removed from retail*/
  37. /*                distribution.  I doubt this is going to be a problem.  Clearly if  */
  38. /*                your product is enhanced by the use of these drivers, your company */
  39. /*                can easily afford a nominal license fee of $500 in exchange for      */
  40. /*                getting the use of several man-years of software engineering             */
  41. /*                resources.                                                                                                                 */
  42. /*****************************************************************************/
  43. extern short    cdecl far CheckMidiIn(void); // Returns 1 if MIDPAK is installed, 0 if not.
  44. extern short    cdecl far DigPakAvailable(void);    // Returns 1 if DIGPAK is installed, 0 if not.
  45.  
  46. /****************************************************************************/
  47. /* These flags are returned by the XMIDI registration call.             */
  48. /****************************************************************************/
  49. #define FAILURE_TO_REGISTER 0     // Xmidi file registration failed.
  50. #define REGISTERED_RESIDENT 1   // Resident driver holds midi file now.
  51.                 // The application can throw away the memory
  52.                 // if it wants to.
  53. #define REGISTERED_APPLICATION 2  // Driver didn't have a big enough buffer
  54.                   // area reserved to hold the audio data
  55.                   // so the application is responsible for
  56.                   // keeping the memory for this sequence
  57.                   // while it is registered.
  58.  
  59. extern short    cdecl far PlaySequence(short seqnum); // Play a particular sequence number from
  60.                   // the currently registered xmidi file.
  61.  
  62. #define NEXT_CALLBACK -1    // Activation on next callback.
  63.  
  64. extern short    cdecl far SegueSequence(short seqnum,short activate);
  65.                 // Switch sequence to this sequence when next
  66.                 // callback trigger event is hit with the
  67.                 // event number equal to activate.    If activate
  68.                 // is set to -1 then the next event causes the
  69.                 // segue to occur.
  70.  
  71. extern short    cdecl far RegisterXmidi(char    far *xmidi,long int size);
  72.                 // Registers an extended midi file for playback.
  73.                 // This call will register all sequences.
  74.  
  75. extern short    cdecl far MidiStop(void);     // Stop playing current sequence.
  76.  
  77. extern long int  cdecl far ReportCallbackTrigger(void); // Low word is trigger count.
  78.                       // High word is last event ID.
  79.  
  80. extern void  cdecl far ResetCallbackCounter(void);    // Reset callback counter to zero.
  81.  
  82. extern void  cdecl far ResumePlaying(void);     // Resume playing last sequence.
  83.  
  84. #define SEQ_STOPPED 0         // equates for SequenceStatus()
  85. #define SEQ_PLAYING 1
  86. #define SEQ_DONE 2
  87. extern short     cdecl far SequenceStatus(void);    // Report current sequence play status.
  88.  
  89. extern short     cdecl far RelativeVolume(short vol); // Report current volume.
  90.  
  91. extern void  cdecl far SetRelativeVolume(short vol,short time); // Set volume, over time period.
  92.  
  93. #define NOBUFFER 1        // No resident buffer available.
  94. #define FILENOTFOUND 2        // The file was not found.
  95. #define FILETOBIG 3         // The file exceeds the reserved buffer size.
  96. #define REGISTRATIONERROR 4     // Error registering the XMI file.
  97.  
  98. extern short     cdecl far RegisterXmidiFile(char far *fname); // Register by filename.
  99.  
  100. extern void  cdecl far PollMidPak(void); // Poll MidPak for music processing.
  101.  
  102. extern long int  cdecl far MidPakClock(void); // Return MIDPAK heartbeat count (120hz)
  103.  
  104. extern long int far * cdecl far MidPakClockAddress(void); // Return address of midpak clock.
  105.  
  106. extern short far *    cdecl far TriggerCountAddress(void); // Report address of trigger count.
  107.  
  108. extern short far *    cdecl far EventIDAddress(void); // Report address of event id.
  109.  
  110. extern short    cdecl far ReportSequenceNumber(void);
  111.  
  112. extern short    cdecl far InitMP(short midpakseg,short advseg,char    far *ad); // Init MIDI driver.
  113. extern void cdecl far DeInitMP(short midpakseg); // Unload a previously loaded sound driver.
  114.