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

  1. ;*    DSM.INC
  2. ;*
  3. ;* Digital Sound Mixer, v1.11
  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. VOLLEVELS = 33                ; total number of volume levels
  15. VOLSHIFT = 1                ; amount to shift volume right
  16. VOLADD = 1                ; amount to add to volume before
  17.                     ; shifting - used to round up
  18. SMPMAX = 65519                ; max sample length
  19.  
  20.  
  21. ;/***************************************************************************\
  22. ;*     struct dsmChannel
  23. ;*     -----------------
  24. ;* Description:  DSM channel data
  25. ;\***************************************************************************/
  26.  
  27. STRUC    dsmChannel
  28.  
  29.     pos        DW    ?    ; mixing position
  30.     posl        DW    ?    ; mixing position fraction
  31.     rate        DD    ?    ; playing rate in Hz
  32.     inst        DW    ?    ; instrument number
  33.         sample          DD      ?       ; current sample pointer
  34.         smpType         DB      ?       ; current sample type
  35.         smpPos          DB      ?       ; current sample position
  36.         slength         DW      ?       ; current sample length
  37.         loopStart       DW      ?       ; current sample loop start
  38.         loopEnd         DW      ?       ; current sample loop end
  39.         looping         DB      ?       ; 1 if current sample is looping
  40.         instChanged     DB      ?       ; 1 if instrument has been changed
  41.                                         ; (Amiga Loop Emulation)
  42.         panning         DB      ?       ; panning information
  43.     volume        DB    ?    ; playing volume (0-64)
  44.     muted        DB    ?    ; 1 if channel muted, 0 if not
  45.     hasData     DB    ?    ; 1 if channel has data to be played,
  46.                     ; 0 if not
  47. ENDS
  48.  
  49.  
  50.  
  51. ;/***************************************************************************\
  52. ;*     struct dsmInstrument
  53. ;*     --------------------
  54. ;* Description:  DSM internal instrument structure
  55. ;\***************************************************************************/
  56.  
  57. STRUC    dsmInstrument
  58.  
  59.     sample        DD    ?    ; pointer to sample data
  60.     smpType     DB    ?    ; sample type
  61.     smpPos        DB    ?    ; sample position. see enum dsmSmpPos
  62.     slength     DW    ?    ; sample length
  63.     loopStart    DW    ?    ; sample loop start
  64.     loopEnd     DW    ?    ; sample loop end
  65.     volume        DB    ?    ; default playing volume
  66.     looping     DB    ?    ; 1 if looping sample, 0 if not
  67.     inuse        DB    ?    ; 1 if sample is in use, 0 if not
  68.                     ; (removed using dsmRemInstrument())
  69. ENDS
  70.  
  71.  
  72.  
  73.  
  74. GLOBAL    LANG dsmInit : far
  75. GLOBAL    LANG dsmClose : far
  76. GLOBAL    LANG dsmGetMixRate : far
  77. GLOBAL    LANG dsmGetMode : far
  78. GLOBAL    LANG dsmOpenChannels : far
  79. GLOBAL    LANG dsmCloseChannels : far
  80. GLOBAL    LANG dsmClearChannels : far
  81. GLOBAL    LANG dsmMute : far
  82. GLOBAL    LANG dsmPause : far
  83. GLOBAL    LANG dsmSetMasterVolume : far
  84. GLOBAL    LANG dsmPlaySound : far
  85. GLOBAL    LANG dsmStopSound : far
  86. GLOBAL    LANG dsmSetRate : far
  87. GLOBAL    LANG dsmGetRate : far
  88. GLOBAL    LANG dsmSetVolume : far
  89. GLOBAL    LANG dsmSetInstrument : far
  90. GLOBAL    LANG dsmSetPosition : far
  91. GLOBAL    LANG dsmGetPosition : far
  92. GLOBAL    LANG dsmSetPanning : far
  93. GLOBAL    LANG dsmGetPanning : far
  94. GLOBAL    LANG dsmMuteChannel : far
  95. GLOBAL    LANG dsmAddInstrument : far
  96. GLOBAL    LANG dsmRemInstrument : far
  97. GLOBAL    LANG dsmSetUpdRate : far
  98. GLOBAL    LANG dsmPlay : far
  99.  
  100.  
  101.  
  102. GLOBAL    LANG dsmBuffer : dmaBuffer    ; DMA buffer
  103. GLOBAL    LANG dsmDMAPos : word        ; buffer playing position
  104.  
  105.  
  106.  
  107. ;/***************************************************************************\
  108. ;*       enum dsmFunctIDs
  109. ;*       ----------------
  110. ;* Description:  ID numbers for DSM functions
  111. ;\***************************************************************************/
  112.  
  113. ENUM    dsmFunctIDs \
  114.         ID_dsmInit = ID_dsm, \
  115.         ID_dsmClose, \
  116.         ID_dsmOpenChannels, \
  117.         ID_dsmCloseChannels, \
  118.         ID_dsmGetMixRate, \
  119.         ID_dsmGetMode, \
  120.         ID_dsmClearChannels, \
  121.         ID_dsmMute, \
  122.         ID_dsmPause, \
  123.         ID_dsmSetMasterVolume, \
  124.         ID_dsmPlaySound, \
  125.         ID_dsmStopSound, \
  126.         ID_dsmSetRate, \
  127.         ID_dsmGetRate, \
  128.         ID_dsmSetVolume, \
  129.         ID_dsmSetInstrument, \
  130.         ID_dsmSetPosition, \
  131.         ID_dsmGetPosition, \
  132.         ID_dsmSetPanning, \
  133.         ID_dsmGetPanning, \
  134.         ID_dsmMuteChannel, \
  135.         ID_dsmAddInstrument, \
  136.         ID_dsmRemInstrument, \
  137.         ID_dsmSetUpdRate, \
  138.         ID_dsmPlay, \
  139.         ID_dsmMixData
  140.