home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / midas / mplayer.inc < prev    next >
Text File  |  1994-08-06  |  5KB  |  186 lines

  1. ;*    MPLAYER.INC
  2. ;*
  3. ;* Module Player definitions
  4. ;*
  5. ;* Copyright 1994 Petteri Kangaslampi and Jarno Paananen
  6. ;*
  7. ;* This file is part of the MIDAS Sound System, and may only be
  8. ;* used, modified and distributed under the terms of the MIDAS
  9. ;* Sound System license, LICENSE.TXT. By continuing to use,
  10. ;* modify or distribute this file you indicate that you have
  11. ;* read the license and understand and accept it fully.
  12. ;*
  13.  
  14.  
  15. MPCHANNELS = 32             ; maximum number of Module Player
  16.                     ; channels
  17.  
  18.  
  19. ;/***************************************************************************\
  20. ;*     enum mpStatus
  21. ;*     -------------
  22. ;* Description:  Module Player status
  23. ;\***************************************************************************/
  24.  
  25. ENUM    mpStatus \
  26.     mpUnInitialized = 0, \        ; Module Player is uninitialized
  27.     mpInitialized, \        ; initialized
  28.     mpPlaying, \            ; currently playing a module
  29.     mpStopped            ; stopped
  30.  
  31.  
  32.  
  33. ;/***************************************************************************\
  34. ;*     enum modIDNumbers
  35. ;*     -----------------
  36. ;* Description:  mpModule ID numbers
  37. ;\***************************************************************************/
  38.  
  39. ENUM    modIDNumbers \
  40.     idS3M = 0, \            ; Scream Tracker 3 module
  41.     idMOD = 1            ; Protracker module
  42.  
  43.  
  44.  
  45. ;/***************************************************************************\
  46. ;*     struct mpChanInfo
  47. ;*     -----------------
  48. ;* Description:  Module Player channel info structure
  49. ;\***************************************************************************/
  50.  
  51. STRUC    mpChanInfo
  52.     flags        DB    ?    ; bits 0-4 - UNDEFINED
  53.                     ; bit 5 - new note and/or instrument
  54.                     ; bit 6 - new volume (S3M)
  55.                     ; bit 7 - command
  56.     note        DB    ?    ; note number
  57.     instrument    DB    ?    ; instrument number
  58.     volume        DB    ?    ; playing volume
  59.     command     DB    ?    ; command number
  60.     infobyte    DB    ?    ; command infobyte
  61.     volumebar    DB    ?    ; "fake" volume bar
  62.     commandname    DD    ?    ; pointer to command name string,
  63.                     ; ASCIIZ
  64. ENDS
  65.  
  66.  
  67.  
  68. ;/***************************************************************************\
  69. ;*     struct mpInformation
  70. ;*     --------------------
  71. ;* Description:  Module Player information structure
  72. ;\***************************************************************************/
  73.  
  74. STRUC    mpInformation
  75.     numChannels    DW    ?    ; number of channels. MUST be set by
  76.                     ; the routine calling
  77.                     ; MP->GetInformation()
  78.     setFrame    DW    ?    ; 1 if "set frame", 0 if not
  79.     speed        DW    ?    ; playing speed
  80.     BPM        DW    ?    ; playing BPM tempo
  81.     pos        DW    ?    ; current playing position
  82.     pattern     DW    ?    ; current pattern number
  83.     row        DW    ?    ; current row number
  84.     loopCnt     DW    ?    ; song loop counter
  85.     chans        DD    ?    ; pointer to channel data structures.
  86.                     ; MUST be allocated by the routine
  87.                     ; calling MP->GetInformation()
  88. ENDS
  89.  
  90.  
  91.  
  92. ;/****************************************************************************
  93. ;*     struct mpInstrument
  94. ;*     -------------------
  95. ;* Description:  General instrument structure in memory
  96. ;\****************************************************************************
  97.  
  98. STRUC    mpInstrument
  99.     fileName    DB    13 dup (?)
  100.     iname        DB    32 dup (?)
  101.     sample        DD    ?
  102.     length        DW    ?
  103.     loopStart    DW    ?
  104.     loopEnd     DW    ?
  105.     looping     DB    ?
  106.     volume        DB    ?
  107.     c2Rate        DD    ?
  108.     finetune    DB    ?
  109.     sdInstHandle    DW    ?
  110. ENDS
  111.  
  112.  
  113.  
  114. ;/****************************************************************************
  115. ;*     struct mpPattern
  116. ;*     ----------------
  117. ;* Description:  General pattern structure
  118. ;\****************************************************************************
  119.  
  120. STRUC    mpPattern
  121.     length        DW    ?
  122.     LABEL        data    BYTE
  123. ENDS
  124.  
  125.  
  126.  
  127. ;/****************************************************************************
  128. ;*     struct mpModule
  129. ;*     ---------------
  130. ;* Description:  General Module structure. See MPLAYER.TXT for documentation
  131. ;\****************************************************************************
  132.  
  133. STRUC    mpModule
  134.     ID        DD    ?
  135.     IDnum        DW    ?
  136.     songName    DB    32 dup (?)
  137.     songLength    DW    ?
  138.     numInsts    DW    ?
  139.     numPatts    DW    ?
  140.     numChans    DW    ?
  141.     flags        DW    ?
  142.     masterVol    DB    ?
  143.     speed        DB    ?
  144.     tempo        DB    ?
  145.     masterMult    DB    ?
  146.     stereo        DB    ?
  147.     chanSettings    DB    32 dup (?)
  148.     orders        DD    ?
  149.     insts        DD    ?
  150.     patterns    DD    ?
  151.     pattEMS     DD    ?
  152.     instsUsed    DD    ?
  153. ENDS
  154.  
  155.  
  156.  
  157. ;/****************************************************************************
  158. ;*     struct ModulePlayer
  159. ;*     -------------------
  160. ;* Description:  Module Player structure
  161. ;\****************************************************************************
  162.  
  163. STRUC    ModulePlayer
  164.     status        DW    ?    ; status (see enum above)
  165.     updRate     DW    ?    ; Play() calling rate, in 100*Hz
  166.  
  167.     Identify    DD    ?
  168.     Init        DD    ?
  169.     Close        DD    ?
  170.  
  171.     LoadModule    DD    ?
  172.     FreeModule    DD    ?
  173.  
  174.     PlayModule    DD    ?
  175.     StopModule    DD    ?
  176.  
  177.     SetInterrupt    DD    ?
  178.     RemoveInterrupt DD    ?
  179.  
  180.     Play        DD    ?
  181.  
  182.     SetPosition    DD    ?
  183.     GetInformation    DD    ?
  184.         SetMasterVolume DD      ?
  185. ENDS
  186.