; midi/midibase.i

	ifnd	MIDI_MIDIBASE_I
MIDI_MIDIBASE_I set 1

	ifnd	EXEC_LIBRARIES_I
	include "exec/libraries.i"
	endc

	ifnd	EXEC_SEMAPHORES_I
	include "exec/semaphores.i"
	endc

	ifnd	LIBRARIES_DOS_I
	include "libraries/dos.i"
	endc

	ifnd	MIDI_MIDI_I
	include "midi/midi.i"
	endc


    STRUCTURE	MidiBase,LIB_SIZE	; Library Base
	STRUCT	ml_SourceList,LH_SIZE	    ; Source List
	STRUCT	ml_DestList,LH_SIZE	    ; Dest List

	STRUCT	ml_ListSemaphore,SS_SIZE    ; locks source/dest lists - blocks Src & Dst list management
					    ; (locked when LockBase is called)
	STRUCT	ml_RouteSemaphore,SS_SIZE   ; locks routes - blocks msg routing & RPList management in Src & Dst
	ULONG	ml_SegList		    ; Segment List for the library
	ULONG	ml_SysBase		    ; SysBase
	ULONG	ml_DosBase		    ; DosBase

	LABEL	sizeof_MidiBase


    STRUCTURE	MTaskInfo,0 ; Task info structure for PermNodes
	APTR	ti_Name 	; Process Name
	WORD	ti_Pri		; Process Priority
	APTR	ti_Entry	; Entry point
	UWORD	ti_Stack	; Stack Size

	UWORD	ti_Sources	; source count
	APTR	ti_SourceList	; source list
	UWORD	ti_Dests	; dest count
	APTR	ti_DestList	; dest list

	STRUCT	ti_Semaphore,SS_SIZE	; signal semaphore for locking this task

	UWORD	ti_UsageCount
	APTR	ti_TaskPort	; task's MsgPort
	BPTR	ti_Segment	; BPTR pointer to tasks segment
	LABEL	sizeof_MTaskInfo


    STRUCTURE	MNodeInfo,0 ; PermNode info structure
	APTR	ni_Name 	; Node Name
	APTR	ni_Image	; Node Image
	APTR	ni_Node 	; Node pointer
	LABEL	sizeof_MNodeInfo

	endc
