2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
9 #include <proto/utility.h>
10 #include <proto/realtime.h>
12 #include "realtime_intern.h"
14 /*****************************************************************************
18 #include <libraries/realtime.h>
20 AROS_LH1(VOID
, DeletePlayer
,
24 AROS_LHA(struct Player
*, player
, A0
),
28 struct Library
*, RealTimeBase
, 8, RealTime
)
32 Delete a player. If this was the last player of a specific conductor,
33 this conductor is deleted too.
37 player -- Player to delete; may be NULL in which case this function
56 26.7.99 SDuvan implemented
58 ******************************************************************************/
63 struct Conductor
*conductor
;
70 conductor
= player
->pl_Source
;
72 if (conductor
!= NULL
)
76 lock
= LockRealTime(RT_CONDUCTORS
);
77 Remove((struct Node
*)player
);
79 /* If this was the last player of this conductor, we delete the
81 if (IsListEmpty(&conductor
->cdt_Players
))
83 Remove((struct Node
*)conductor
);
84 FreeMem(conductor
, sizeof(struct Conductor
));
90 FreeMem(player
, sizeof(struct Player
));