2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <proto/realtime.h>
8 #include <proto/utility.h>
9 #include "realtime_intern.h"
11 /*****************************************************************************
15 #include <utility/tagitem.h>
16 #include <libraries/realtime.h>
18 AROS_LH2(BOOL
, GetPlayerAttrsA
,
22 AROS_LHA(struct Player
*, player
, A0
),
23 AROS_LHA(struct TagItem
*, tagList
, A1
),
27 struct Library
*, RealTimeBase
, 14, RealTime
)
31 Query the attributes of a player. For each tagitem ti_Tag specifies the
32 attribute and ti_Data a pointer to the IPTR variable in which you want
33 the value to be stored.
37 player -- The player the attributes of which to set; may be NULL,
38 in which case the result is 0.
39 tagList -- Pointer to an array of tags describing the player's
48 The number of items successfully filled in.
58 CreatePlayerA(), SetPlayerAttrsA()
62 ******************************************************************************/
64 #define Put (*((IPTR *)(tag->ti_Data)))
70 struct TagItem
*tl
= tagList
;
73 /* Maybe we could use FindTagItem to initialize error and conductor
78 while ((tag
= NextTagItem(&tl
)) != NULL
)
83 Put
= (IPTR
)player
->pl_Link
.ln_Name
;
87 Put
= (IPTR
)player
->pl_Hook
;
91 Put
= (IPTR
)player
->pl_Link
.ln_Pri
;
94 case PLAYER_Conductor
:
95 Put
= (IPTR
)player
->pl_Source
;
99 Put
= (player
->pl_Flags
& PLAYERF_READY
) != 0;
102 case PLAYER_AlarmTime
:
103 Put
= player
->pl_AlarmTime
;
107 Put
= (player
->pl_Flags
& PLAYERF_ALARMSET
) != 0;
110 case PLAYER_AlarmSigTask
:
111 Put
= (IPTR
)player
->pl_Task
;
114 case PLAYER_AlarmSigBit
:
115 /* We could use player->pl_Link.mn_Type here */
116 Put
= player
->pl_Reserved0
; /* NOTE! */
120 Put
= (player
->pl_Flags
& PLAYERF_QUIET
) != 0;
123 case PLAYER_UserData
:
124 Put
= (IPTR
)player
->pl_UserData
;
128 Put
= player
->pl_PlayerID
;
131 case PLAYER_Conducted
:
132 Put
= (player
->pl_Flags
& PLAYERF_CONDUCTED
) != 0;
136 Put
= (player
->pl_Flags
& PLAYERF_EXTSYNC
) != 0;
147 } /* GetPlayerAttrsA */