1 #ifndef CLIB_CAMD_PROTOS_H
    2 #define CLIB_CAMD_PROTOS_H
    3 
    4 #ifndef EXEC_TYPES_H
    5 #include <exec/types.h>
    6 #endif
    7 
    8 #ifndef LIBRARIES_CAMD_H
    9 #include <libraries/camd.h>
   10 #endif
   11 
   12 APTR LockCAMD(ULONG locknum);
   13 void UnlockCAMD(APTR lock);
   14 
   15 struct MidiNode *CreateMidiA(CONST struct TagItem *tags);
   16 void DeleteMidi(struct MidiNode *mn);
   17 BOOL SetMidiAttrsA(struct MidiNode *mn, CONST struct TagItem *tags);
   18 ULONG GetMidiAttrsA(struct MidiNode *mn, CONST struct TagItem *tags);
   19 struct MidiNode *NextMidi(struct MidiNode *mn);
   20 struct MidiNode *FindMidi(CONST_STRPTR name);
   21 void FlushMidi(struct MidiNode *mn);
   22 
   23 struct MidiLink *AddMidiLinkA(struct MidiNode *mn, LONG, CONST struct TagItem *tags);
   24 void RemoveMidiLink(struct MidiLink *ml);
   25 BOOL SetMidiLinkAttrsA(struct MidiLink *ml, CONST struct TagItem *tags);
   26 ULONG GetMidiLinkAttrsA(struct MidiLink *ml, CONST struct TagItem *tags);
   27 struct MidiLink *NextClusterLink(struct MidiCluster *mc, struct MidiLink *ml, LONG type);
   28 struct MidiLink *NextMidiLink(struct MidiNode *mn, struct MidiLink *ml, LONG type);
   29 BOOL MidiLinkConnected(struct MidiLink *ml);
   30 
   31 struct MidiCluster *NextCluster(struct MidiCluster *mc);
   32 struct MidiCluster *FindCluster(CONST_STRPTR name);
   33 
   34 void PutMidi(struct MidiLink *ml, ULONG msgdata);
   35 BOOL GetMidi(struct MidiNode *mn, MidiMsg *msg);
   36 BOOL WaitMidi(struct MidiNode *mn, MidiMsg *msg);
   37 
   38 void PutSysEx(struct MidiLink *mn, UBYTE *buffer);
   39 ULONG GetSysEx(struct MidiNode *mn, UBYTE *buffer, ULONG length);
   40 ULONG QuerySysEx(struct MidiNode *mn);
   41 void SkipSysEx(struct MidiNode *mn);
   42 
   43 UBYTE GetMidiErr(struct MidiNode *mn);
   44 WORD MidiMsgType(MidiMsg *msg);
   45 WORD MidiMsgLen(ULONG status);
   46 
   47 void ParseMidi(struct MidiLink *ml, UBYTE *buffer, ULONG length);
   48 
   49 struct MidiDeviceData *OpenMidiDevice(UBYTE *name);
   50 void CloseMidiDevice(struct MidiDeviceData *mdd);
   51 
   52 int RethinkCAMD(void);
   53 void StartClusterNotify(struct ClusterNotifyNode *node);
   54 void EndClusterNotify(struct ClusterNotifyNode *node);
   55 
   56 #if !defined(USE_INLINE_STDARG)
   57 struct MidiNode *CreateMidi(Tag, ...);
   58 BOOL SetMidiAttrs(struct MidiNode *mn, Tag tag, ...);
   59 ULONG GetMidiAttrs(struct MidiNode *mn, Tag tag, ...);
   60 struct MidiLink *AddMidiLink(struct MidiNode *mn, LONG, Tag, ...);
   61 BOOL SetMidiLinkAttrs(struct MidiLink *ml, Tag tag, ...);
   62 ULONG GetMidiLinkAttrs(struct MidiLink *ml, Tag tag, ...);
   63 #endif
   64 
   65 #endif /* CLIB_CAMD_PROTOS_H */