Skip to content

GetSpeakingChannels List behaviour differs between LocalVoicePlayerState and RemoteVoicePlayerState #326

Description

@Insprill

In RemoteVoicePlayerState, the GetSpeakingChannels method clears the input list before writing to it.
In LocalVoicePlayerState, the GetSpeakingChannelsmethod does not clear the input list before writing to it.

In my project, I have a static list that's reused for all GetSpeakingChannels calls. Originally, it was used only for remote players, but it has recently been used for local players as well. Since the local player never cleared the list, this sometimes led to strange behaviour in other systems that I eventually tracked down to LocalVoicePlayerState not clearing the list before writing to it.

Ideally, LocalVoicePlayerState.GetSpeakingChannels should also clear the list. If that's not desired, either RemoteVoicePlayerState should also not clear the list, or a doc comment should be written stating that clearing behaviour is undefined.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions