|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VoiceGroup
This is the interface that all voice groups must satisfy, and it's based exclusively on oids. The only players represented in the group at this level are those who are currently connected and have chosen this group as their current voice group.
Method Summary | |
---|---|
GroupMember |
addMember(OID memberOid,
VoiceConnection memberCon)
Add a member to a group |
GroupMember |
addMember(OID memberOid,
VoiceConnection memberCon,
int priority,
boolean allowedSpeaker)
Add a member to a group |
boolean |
addMemberAllowed(OID memberOid)
Determine if the oid is that of a member of the group. |
void |
getAllMembers(java.util.List<GroupMember> memberList)
Get all members of the group. |
java.util.Set<OID> |
getAllowedMembers()
Return the allowed members |
int |
getDefaultPriority()
Get the default priority that should be applied to new members if no priority is supplied |
OID |
getGroupOid()
Return the group oid of a voice group. |
boolean |
isAllowedSpeaker(OID memberOid)
Is the member allowed to speak? |
boolean |
isListener(OID memberOid)
Is the member listening? |
GroupMember |
isMember(OID memberOid)
Find a member in the group by oid. |
boolean |
isMemberSpeaking(OID memberOid)
Is the member speaking? |
boolean |
isPositional()
Return true if the group is a positional group; that is, if membership in the group is determined by being near the listener, and the priority of speakers is determined by how near any speaker is. |
void |
onAfterAddMember(OID memberOid,
OID groupOid,
boolean allowedSpeaker,
byte micVoiceNumber,
boolean listenToYourself)
A call to this method is made after an addMember() operation. |
void |
onAfterRemoveMember(OID memberOid,
OID groupOid,
boolean allowedSpeaker)
A call to this method is made after a removeMember() operation. |
boolean |
removeMember(OID memberOid)
Remove the member of the group identified by the given oid, and return true if that member was found in the group. |
void |
sendVoiceFrameToListeners(OID speakerOid,
AOByteBuffer buf,
byte opcode,
int pktSize)
Send a voice frame originating with the speaker with the given oid, and contained in the first dataSize bytes of buf, to all eligible listeners |
void |
setAllowedMembers(java.util.Set<OID> allowedMembers)
Supply a list of oids of players allowed to be in the group |
void |
setAllowedSpeaker(OID memberOid,
boolean add)
Change the member with the given oid to be an allowed speaker if add is true, or not an allowed speaker if add is false. |
void |
setListener(OID memberOid,
boolean add)
Change the member with the given oid to be a listener if add is true, or not a listener if add is false. |
void |
setMemberSpeaking(OID memberOid,
boolean add)
Change the member with the given oid, who must be an allowed speaker, to speak if add is true, or to stop speaking, if add is false. |
Method Detail |
---|
boolean isPositional()
OID getGroupOid()
boolean addMemberAllowed(OID memberOid)
memberOid
- The oid of possible group member.
void setAllowedMembers(java.util.Set<OID> allowedMembers)
allowedMembers
- The set of oids of possible group members.java.util.Set<OID> getAllowedMembers()
GroupMember addMember(OID memberOid, VoiceConnection memberCon)
memberOid
- The oid of the newly-created membermemberCon
- The VoiceConnection object that embodies
the connection to the voice server.
void getAllMembers(java.util.List<GroupMember> memberList)
memberList
- The list of the members to which the groups
members should be added.GroupMember addMember(OID memberOid, VoiceConnection memberCon, int priority, boolean allowedSpeaker)
memberOid
- The oid of the newly-created membermemberCon
- The VoiceConnection object that embodies
the connection to the voice server.priority
- The speaking priority that the member should be
assigned; speakers with higher priorities will be heard over
speakers with lower priorities.allowedSpeaker
- True if the new member should be allowed
to speak; false otherwise.
void onAfterAddMember(OID memberOid, OID groupOid, boolean allowedSpeaker, byte micVoiceNumber, boolean listenToYourself)
memberOid
- The oid of the newly-created membergroupOid
- The groupOid of the voice group.allowedSpeaker
- True if the member is allowed to speak;
false otherwise.micVoiceNumber
- The voice number of the incoming voice
packets. For now, this is always zero.listenToYourself
- True if the member wants his own voice
frames sent back to him. This is only used for testing
purposes.GroupMember isMember(OID memberOid)
memberOid
- The oid of the member to find
boolean removeMember(OID memberOid)
memberOid
- The oid of the member to remove.void onAfterRemoveMember(OID memberOid, OID groupOid, boolean allowedSpeaker)
memberOid
- The oid of the newly-created membergroupOid
- The groupOid of the voice group.allowedSpeaker
- True if the member is allowed to speak;
false otherwise.int getDefaultPriority()
void setAllowedSpeaker(OID memberOid, boolean add)
memberOid
- The member whose allowed speaker status should
change.add
- If true, make the member an allowed speaker; if
false, stop allowing the member to be a speaker.void setMemberSpeaking(OID memberOid, boolean add)
memberOid
- The member whose speaking status should
change.add
- If true, make the member a speaker in the group,
if add is True, else stop the member speaking.void setListener(OID memberOid, boolean add)
memberOid
- The member whose whose status should
change.add
- If true, make the member a listener in the group,
if add is True, else stop the member listening.void sendVoiceFrameToListeners(OID speakerOid, AOByteBuffer buf, byte opcode, int pktSize)
speakerOid
- The oid of the speaker that is the source of the voice frame(s)buf
- The buffer containing data packet; typically a data aggregation packetopcode
- The opcode to use when sending the frame(s). Typically
VoicePlugin.opcodeAggregatedData.pktSize
- The size of the data packet.boolean isAllowedSpeaker(OID memberOid)
memberOid
- The oid of the member who allowed speaking status should be returned.
boolean isMemberSpeaking(OID memberOid)
memberOid
- The oid of the member who speaking status should be returned.
boolean isListener(OID memberOid)
memberOid
- The oid of the member who listening status should be returned.
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |