Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecipientSender ¶
RecipientSender sends an audio packet to a recipient.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router forwards voice packets to appropriate recipients.
func NewRouter ¶
func NewRouter(sender RecipientSender, getChan func(uint32) uint32, getUsersInChan func(uint32) []uint32, getVoiceTarget func(uint32, uint8) []uint32) *Router
NewRouter creates an audio router.
func NewRouterWithConfig ¶
func NewRouterWithConfig(cfg RouterConfig) *Router
NewRouterWithConfig creates an audio router with full configuration.
func (*Router) SetVoiceDebug ¶
SetVoiceDebug updates the voice debug flag for runtime toggling.
type RouterConfig ¶
type RouterConfig struct {
Sender RecipientSender
GetChan func(sessionID uint32) uint32
GetUsersInChan func(channelID uint32) []uint32
GetVoiceTarget func(sessionID uint32, targetID uint8) []uint32
GetLinkedChans func(channelID uint32) []uint32
FilterRecipient func(senderSessionID, recipientSessionID uint32) bool
CanSenderSpeak func(senderSessionID uint32) bool
VoiceDebug bool
}
RouterConfig configures the audio router.
Click to show internal directories.
Click to hide internal directories.