2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 #include "camd_intern.h"
12 /*****************************************************************************
16 AROS_LH3(struct MidiLink
*, NextMidiLink
,
19 AROS_LHA(struct MidiNode
*, midinode
, A0
),
20 AROS_LHA(struct MidiLink
*, midilink
, A1
),
21 AROS_LHA(LONG
, type
, D0
),
24 struct CamdBase
*, CamdBase
, 19, Camd
)
27 Returns the next MidiLink of a specified type that belongs
28 to a midinode. Or NULL if midilink was the last. If midilink
29 is NULL, returns the first one.
32 type - MLTYPE_Sender or MLTYPE_Receiver.
37 CL_Linkages must be locked.
49 2001-01-12 ksvalast first created
50 2006-01-16 Lyle Hazelwood complete re-write.
52 *****************************************************************************/
58 if(type
==MLTYPE_Receiver
){
59 node
=midinode
->mi_InLinks
.mlh_Head
;
61 node
=midinode
->mi_OutLinks
.mlh_Head
;
65 if(node
->mln_Succ
!= NULL
){
66 return(GetMidiLinkFromOwnerNode(node
));
71 node
=&midilink
->ml_OwnerNode
;
73 if(node
->mln_Succ
!= NULL
){
74 return(GetMidiLinkFromOwnerNode(node
));
81 while(node->mln_Succ!=NULL){
83 return (struct MidiLink *)node;
85 if(node==(struct MinNode *)midilink){
86 if(node->mln_Succ->mln_Succ!=NULL){
87 return GetMidiLinkFromOwnerNode(node->mln_Succ);