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 CreatePlayer(), SetPlayerAttrs()
62 ******************************************************************************/
64 #define Put (*((IPTR *)(tag->ti_Data)))
70 struct TagItem
*tag
, *tl
= tagList
;
72 /* Maybe we could use FindTagItem to initialize error and conductor
77 while ((tag
= NextTagItem(&tl
)) != NULL
)
82 Put
= (IPTR
)player
->pl_Link
.ln_Name
;
86 Put
= (IPTR
)player
->pl_Hook
;
90 Put
= (IPTR
)player
->pl_Link
.ln_Pri
;
93 case PLAYER_Conductor
:
94 Put
= (IPTR
)player
->pl_Source
;
98 Put
= (player
->pl_Flags
& PLAYERF_READY
) != 0;
101 case PLAYER_AlarmTime
:
102 Put
= player
->pl_AlarmTime
;
106 Put
= (player
->pl_Flags
& PLAYERF_ALARMSET
) != 0;
109 case PLAYER_AlarmSigTask
:
110 Put
= (IPTR
)player
->pl_Task
;
113 case PLAYER_AlarmSigBit
:
114 /* We could use player->pl_Link.mn_Type here */
115 Put
= player
->pl_Reserved0
; /* NOTE! */
119 Put
= (player
->pl_Flags
& PLAYERF_QUIET
) != 0;
122 case PLAYER_UserData
:
123 Put
= (IPTR
)player
->pl_UserData
;
127 Put
= player
->pl_PlayerID
;
130 case PLAYER_Conducted
:
131 Put
= (player
->pl_Flags
& PLAYERF_CONDUCTED
) != 0;
135 Put
= (player
->pl_Flags
& PLAYERF_EXTSYNC
) != 0;
146 } /* GetPlayerAttrsA */