2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 #include "camd_intern.h"
11 /*****************************************************************************
15 AROS_LH3(struct MidiLink
*, NextClusterLink
,
18 AROS_LHA(struct MidiCluster
*, cluster
, A0
),
19 AROS_LHA(struct MidiLink
*, midilink
, A1
),
20 AROS_LHA(LONG
, type
, D0
),
23 struct CamdBase
*, CamdBase
, 18, Camd
)
26 Finds the next midilink of a specified type in a midicluster.
29 cluster - Pointer to the midicluster that the midilink belongs to.
30 midilink - Pointer to the midilink to begin searching from.
31 type - Either MLTYPE_Receiver or MLTYPE_Sender
34 Returns the next MidiLink of a spevified type, or NULL if the last
35 in the list. If midilink is NULL, returns the first.
38 CL_Linkages must be locked.
50 2001-01-12 ksvalast first created
52 *****************************************************************************/
58 if(type
==MLTYPE_Receiver
){
59 node
=cluster
->mcl_Receivers
.lh_Head
;
61 node
=cluster
->mcl_Senders
.lh_Head
;
65 while(node
->ln_Succ
!=NULL
){
66 if(node
->ln_Type
!=NT_USER
-MLTYPE_NTypes
){
68 return (struct MidiLink
*)node
;
70 if(node
==&midilink
->ml_Node
){
71 if(node
->ln_Succ
->ln_Succ
!=NULL
){
72 return (struct MidiLink
*)node
->ln_Succ
;