home *** CD-ROM | disk | FTP | other *** search
/ Sound, Music & MIDI Collection 2 / SMMVOL2.bin / DOS / SS_PLAY / APLAY121.ZIP / DEVELOPE.LHA / Include3.0 / Own / AccessiblePlayer.i next >
Encoding:
Text File  |  1995-03-05  |  4.7 KB  |  234 lines

  1. ; AccessiblePlayer Include File
  2. ;
  3.  
  4.     IFND    EXEC_TYPES_I
  5.     INCLUDE    "Exec/Types.i"
  6.     ENDC
  7.  
  8.     IFND    UTILITY_TAGITEM_I
  9.     INCLUDE    "Utility/Tagitem.i"
  10.     ENDC
  11.  
  12. apVersion    =    3        ;Current Version Of APlayer
  13.  
  14. ; Library Offsets
  15.  
  16. apGetTags    =    -30
  17.  
  18. ; Message Numbers
  19.  
  20. MSG_NextMod    =    "NM"        ;Load Next Module
  21. MSG_NextPos    =    "NP"        ;Update Position
  22. MSG_CallBack    =    "CB"        ;Call Your CallBack Routine
  23.  
  24. ; Messages From Version 3 (Released as 1.11)
  25.  
  26. MSG_UpdateAbout    =    "UA"        ;Update About Window
  27.  
  28. ; Sample Info Structure
  29.  
  30.     STRUCTURE SampleInfoStruct,0
  31.     STRUCT    SI_Name,24        ;Store a NULL-terminated string with
  32.                     ;the name of the sample here.
  33.     APTR    SI_Address        ;Set this to the start address of the
  34.                     ;sample. Zero means no play.
  35.     LONG    SI_Length        ;Set this to the length of the sample
  36.                     ;in bytes.
  37.     LONG    SI_RepLen        ;This should indicate how many bytes
  38.                     ;of the sample to be looped. Zero
  39.                     ;means no loop.
  40.  
  41. ; This Part Are Only Used In The APG_PlaySample Function
  42.  
  43.     UBYTE    SI_Volume        ;Set this to the volume you want.
  44.     UBYTE    SI_Channel        ;Set this to the channel you want to
  45.                     ;use.
  46.     WORD    SI_Period        ;Set this to the period you want to
  47.                     ;play with.
  48.     LABEL    SampleInfoStruct_SIZEOF
  49.  
  50. ; Config Structure
  51.  
  52.     STRUCTURE ConfigStruct,0
  53.     FPTR    CS_GadUpdate        ;Pointer to a function that will fill
  54.                     ;out a tag list with the new values.
  55.                     ;It should return a pointer to the tag
  56.                     ;lists in A0.
  57.     FPTR    CS_Exit            ;Pointer to a Exit function.
  58.     UWORD    CS_Width        ;Window Width.
  59.     UWORD    CS_Height        ;Window Height.
  60.     APTR    CS_Title        ;Pointer To Window Title.
  61.     ULONG    CS_IDCMP        ;Extra IDCMPs. These IDCMPs will
  62.                     ;always be set: GADGETUP, GADGETDOWN,
  63.                     ;VANILLAKEY and MENUPICK.
  64.     APTR    CS_PrefName        ;Pointer to a preference filename
  65.                     ;without a path.
  66.     APTR    CS_PrefData        ;Pointer to your preference data.
  67.     APTR    CS_DefPrefData        ;Pointer to your default pref. data.
  68.     ULONG    CS_PrefSize        ;Number of bytes of your preferences.
  69.  
  70.     UWORD    CS_GadgetNum        ;Number of gadgets you want - 1.
  71.                     ;Then the Gadget Structure if any
  72.                     ;gadgets. See macro below.
  73.  
  74.     UWORD    CS_BevelNum        ;Number of bevel boxes you want - 1.
  75.                     ;Then the Bevel Box Structure if any
  76.                     ;boxes. See macro below.
  77.  
  78. ; Tags
  79.  
  80. APT_TagBase        =    $80000000+"AP"
  81.  
  82.     ENUM    APT_TagBase
  83.  
  84.     EITEM    APT_RequestVersion
  85.     EITEM    APT_EarlyCheck
  86.     EITEM    APT_Check
  87.     EITEM    APT_LoadModule
  88.     EITEM    APT_FreeModule
  89.     EITEM    APT_GetError
  90.     EITEM    APT_ExtLoad
  91.     EITEM    APT_ExtFree
  92.  
  93.     EITEM    APT_InitPlayer
  94.     EITEM    APT_EndPlayer
  95.     EITEM    APT_InitSound
  96.     EITEM    APT_EndSound
  97.  
  98.     EITEM    APT_Interrupt
  99.     EITEM    APT_StartIRQ
  100.     EITEM    APT_StopIRQ
  101.  
  102.     EITEM    APT_Config
  103.  
  104.     EITEM    APT_PlayerName
  105.     EITEM    APT_Description
  106.  
  107.     EITEM    APT_ModuleName
  108.     EITEM    APT_Author
  109.     EITEM    APT_SubSong
  110.  
  111.     EITEM    APT_CIA
  112.     EITEM    APT_Pause
  113.     EITEM    APT_Volume
  114.     EITEM    APT_VolumeFunc
  115.  
  116.     EITEM    APT_FastMem
  117.  
  118.     EITEM    APT_GetMaxPattern
  119.     EITEM    APT_GetMaxSample
  120.     EITEM    APT_GetSongLength
  121.     EITEM    APT_GetSongPos
  122.  
  123.     EITEM    APT_Rewind
  124.     EITEM    APT_Forward
  125.     EITEM    APT_ChangeChannel
  126.     EITEM    APT_TestNextLine
  127.  
  128.     EITEM    APT_GetSample
  129.     EITEM    APT_PlaySample
  130.     EITEM    APT_RealtimePlay
  131.  
  132.     EITEM    APT_CallBack
  133.  
  134. ; Tags From Version 2 (Released as 1.1)
  135.  
  136.     EITEM    APT_Flags
  137.  
  138. ; Tags From Version 3 (Released as 1.11)
  139.  
  140.     EITEM    APT_CfgWindow
  141.  
  142. ; APT_Flags Flags
  143.  
  144. AFB_AnyMem    =    0
  145. AFB_UseAudio    =    1
  146.  
  147. AF_AnyMem    =    1<<AFB_AnyMem
  148. AF_UseAudio    =    1<<AFB_UseAudio
  149.  
  150. ; Flags From Version 3 (Released as 1.11)
  151.  
  152. AFB_SongEnd    =    2
  153.  
  154. AF_SongEnd    =    1<<AFB_SongEnd
  155.  
  156. ; Global Data Structure
  157.  
  158.     STRUCTURE APlayerGlobal,0
  159.     ULONG    APG_FileSize
  160.     UWORD    APG_Tune
  161.     WORD    APG_Hz            ;Obsolete
  162.     UBYTE    APG_MaxVolume
  163.     UBYTE    APG_Tempo
  164.     STRUCT    APG_SampleInfo,SampleInfoStruct_SIZEOF
  165.  
  166.     FPTR    APG_AllocMem
  167.     FPTR    APG_FreeMem
  168.  
  169.     FPTR    APG_GetFilename
  170.     FPTR    APG_FindName
  171.  
  172.     FPTR    APG_CheckLoad
  173.     FPTR    APG_PartialLoad
  174.     FPTR    APG_Load
  175.  
  176.     FPTR    APG_DupOpen
  177.     FPTR    APG_DupClose
  178.     FPTR    APG_Seek
  179.  
  180.     FPTR    APG_PlaySample
  181.  
  182.     FPTR    APG_CalcVolume
  183.     FPTR    APG_WaitDMA
  184.     FPTR    APG_SendMsg
  185.     FPTR    APG_SetTimer
  186.  
  187.     FPTR    APG_NewProcess
  188.  
  189.     FPTR    APG_OpenWindow
  190.     FPTR    APG_WaitMsg
  191.     FPTR    APG_Reply
  192.     FPTR    APG_ActivateGadget
  193.     FPTR    APG_GetGadAdr
  194.     FPTR    APG_Flash
  195.  
  196.     FPTR    APG_AllocChannels
  197.     FPTR    APG_FreeChannels
  198.  
  199. ; Functions From Version 2 (Released as 1.1)
  200.  
  201.     FPTR    APG_CutSuffix
  202.  
  203. ; Functions From Version 3 (Released as 1.11)
  204.  
  205.     FPTR    APG_OpenFile
  206.     FPTR    APG_CloseFile
  207.     FPTR    APG_DirRequester
  208.     FPTR    APG_FileRequester
  209.     FPTR    APG_UpdateGadgets
  210.  
  211.     FPTR    APG_CalcTempo
  212.     LABEL    APlayerGlobal_SIZEOF
  213.  
  214. ; This Macro helps you to make Gadgets in your config window
  215.  
  216. GADSTR    MACRO
  217.     dc.w    \2,\3,\4,\5,\6        ;X, Y, Width, Height, ID
  218.     dc.l    \7,\8,\9        ;Flags, Text, Tags
  219.     dc.w    \1            ;Kind
  220.     ENDM
  221.  
  222. ; This Macro helps you to make Bevel Boxes in your config window
  223.  
  224. BEVSTR    MACRO
  225.     dc.w    \1,\2,\3,\4        ;X, Y, Width, Height
  226.     dc.w    \5            ;Normal (FALSE) Or Recessed (TRUE)
  227.     ENDM
  228.  
  229. ; Special Gadget Kinds From Version 3 (Released as 1.11)
  230.  
  231. DISK_KIND    =    800        ;Will Make A Disk Gadget
  232. UPARROW_KIND    =    801        ;Up Arrow Image Button
  233. DOWNARROW_KIND    =    802        ;Down Arrow Image Button
  234.