Atavism Version 2018.1AGIS API

atavism.server.voice
Interface VoiceSender

All Known Implementing Classes:
VoicePlugin

public interface VoiceSender

This is the interface that the voice groups use to send messages to listeners. The VoicePlugin is such a VoiceSender, and likely the only VoiceSender in most virtual worlds.


Method Summary
 void sendAllocateVoice(VoiceConnection speaker, VoiceConnection listener, byte voiceNumber, boolean positional)
          Send a message which tells the client that the server has established a voice channel to the client, identified by the given voiceNumber, using an overloading of sendAllocateVoice in which whether the voice channel will be treated positionally is determined by the boolean positional arg.
 void sendAllocateVoice(VoiceConnection speaker, VoiceConnection listener, byte voiceNumber, byte opcode)
          Send a message which tells the client that the server has established a voice channel to the client, identified by the given voiceNumber, using an overloading of sendAllocateVoice in which the positional boolean is replaced by the appropriate voice allocate opcode.
 void sendDeallocateVoice(VoiceConnection speaker, VoiceConnection listener, byte voiceNumber)
          Send a message which tells the client that the server has deallocated the voice channel whose number is voiceNumber.
 void sendExtensionMessage(WorldManagerClient.ExtensionMessage msg)
          Send a broadcast ExtensionMessage to anyone who cares.
 void sendVoiceFrame(VoiceConnection speaker, VoiceConnection listener, byte opcode, byte voiceNumber, AOByteBuffer sourceBuf, short pktLength)
          Send a voice data message to the client on the voice channel identitified by the voiceNumber.
 

Method Detail

sendAllocateVoice

void sendAllocateVoice(VoiceConnection speaker,
                       VoiceConnection listener,
                       byte voiceNumber,
                       boolean positional)
Send a message which tells the client that the server has established a voice channel to the client, identified by the given voiceNumber, using an overloading of sendAllocateVoice in which whether the voice channel will be treated positionally is determined by the boolean positional arg.

Parameters:
speaker - The VoiceConnection object that represents the speaker that will be the source of voice data for the new voice channel.
listener - The VoiceConnection object representing the listener player, whose client will be sent an allocate message followed by voice data messages.
voiceNumber - The number, from 0 - maxVoiceChannels, of the voice channel to be established.
positional - True if the voice should behave as a positional voice.

sendAllocateVoice

void sendAllocateVoice(VoiceConnection speaker,
                       VoiceConnection listener,
                       byte voiceNumber,
                       byte opcode)
Send a message which tells the client that the server has established a voice channel to the client, identified by the given voiceNumber, using an overloading of sendAllocateVoice in which the positional boolean is replaced by the appropriate voice allocate opcode.

Parameters:
speaker - The VoiceConnection object that represents the speaker that will be the source of voice data for the new voice channel.
listener - The VoiceConnection object representing the listener player, whose client will be sent an allocate message followed by voice data messages.
voiceNumber - The number, from 0 - maxVoiceChannels, of the voice channel to be established.
opcode - Either VoicePlugin.opcodeAllocatePositional or VoicePlugin.opcodeAllocateNonpositional.

sendDeallocateVoice

void sendDeallocateVoice(VoiceConnection speaker,
                         VoiceConnection listener,
                         byte voiceNumber)
Send a message which tells the client that the server has deallocated the voice channel whose number is voiceNumber.

Parameters:
speaker - The VoiceConnection object that represents the speaker that was the source of voice data for the voice channel.
listener - The VoiceConnection object representing the listener player, whose client will be sent the deallocate message.
voiceNumber - The number, from 0 - maxVoiceChannels, of the voice channel to be established.

sendVoiceFrame

void sendVoiceFrame(VoiceConnection speaker,
                    VoiceConnection listener,
                    byte opcode,
                    byte voiceNumber,
                    AOByteBuffer sourceBuf,
                    short pktLength)
Send a voice data message to the client on the voice channel identitified by the voiceNumber.

Parameters:
speaker - The VoiceConnection object that represents the speaker that was the source of voice data for the voice channel.
listener - The VoiceConnection object representing the listener player, whose client will be sent the voice data message.
opcode - Either VoicePlugin.opcodeAggregateData or VoicePlugin.opcodeData.
voiceNumber - The number, from 0 - maxVoiceChannels, of the voice channel to be established.
sourceBuf - A byte buffer holding the entire voice message as received from the speaker. The first byte of the message is at index 0 in buf.
pktLength - The number of bytes of message in the buf.

sendExtensionMessage

void sendExtensionMessage(WorldManagerClient.ExtensionMessage msg)
Send a broadcast ExtensionMessage to anyone who cares. Used to send "event" messages from the voice groups.

Parameters:
msg - The ExtensionMessage to send.


Copyright © 2018 Dragonsan Studios Sp. z o.o.