Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

[bug] IsSpeaking not correct on MacOS build #222

Closed jasonpixeldash closed 3 years ago

jasonpixeldash commented 3 years ago

Context

VoicePlayerState.IsSpeaking is always returning 'true' on MacOS build. We are using this to track if the local or remote player is talking and to display a 'speaking' graphic on screen. This works fine on Windows and Linux platforms, but for MacOS it does not. Oddly enough, in MacOS Unity editor, this works fine as well. The issue only occurs in MacOS build.

Expected Behavior

VoicePlayerState.IsSpeaking correctly returns false if the player is not speaking.

Actual Behavior

VoicePlayerState.IsSpeaking always returns true for MacOS player (either as local player or remote player).

Workaround

None found yet....

Fix

N/a

Steps to Reproduce

  1. Build game for Windows and MacOS
  2. Connect session between Windows and MacOS builds
  3. Notice that both Windows and MacOS will always see the MacOS player IsSpeaking as true.

Your Environment

martindevans commented 3 years ago

Thanks for reporting this. Could I get you to check a few things to help narrow it down.

Please make sure to test these things with Mode: Push To Talk so that you're certain when you should be transmitting:

jasonpixeldash commented 3 years ago

It definitely happens for both local and remote players. As for your other questions, the problem is that this issue does not happen in editor. Its only in a build of the game where this is an issue, so I can't check the inspectors as it's all correct when testing in editor.

martindevans commented 3 years ago

In that case could you run this code (maybe hook it up to a button press, so you can trigger it at will when you're certain you shouldn't be transmitting):

void LogDissonanceSpeakingData()
{
    Debug.Log("Room Channels Count: " + _roomChannels.Count);
    foreach (var channel in _roomChannels)
        Debug.Log(" - " + channel.Key + "/" + channel.Value.TargetId + "/" + channel.Value.IsOpen);
    Debug.Log("Player Channels Count: " + _playerChannels.Count);
    foreach (var channel in _playerChannels)
        Debug.Log(" - " + channel.Key + "/" + channel.Value.TargetId + "/" + channel.Value.IsOpen);
}

This will log out all of the channels that are sending voice. For VoicePlayerState.IsSpeaking to be true for the local player there must be a channel open.

martindevans commented 3 years ago

We've had a couple of Dissonance releases since the last comment on this issue so I'm going to close this for now. If you've still got an issue on the latest version (8.0.0) don't hesitate to comment here and I'll re-open the issue :)