Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

[bug] iOS devices don't receive audio from other clients #279

Open Ago251 opened 8 months ago

Ago251 commented 8 months ago

Context

I upgraded the Dissonance version from 8.3.1 to 9.0.3 for fix this bug for iOS. The problem has been resolved, but ios devices don't receive sound from other clients. I can detect that a client is speaking, but the amplitude is consistently zero. I also tried a previous build that was loaded on TestFlight with version 8.3.1, and it worked as expected."

Expected behaviour

I expect to receive sound from other clients.

Actual behaviour

With iOS device can send my voice but can't receive voice of others.

Steps to Reproduce

  1. Enter to a chat voice with iOS device

Your Environment

Include as many relevant details about the environment you experienced the bug in

martindevans commented 8 months ago

There's a known issue in 9.0.3 (which I already have a prototype fix for) which sounds similar to this.

Could you try this to see if you are affected by the issue:

  1. In Assets/Plugins/Dissonance/Core/DissonanceCommsImpl.cs find private bool MuteAllRemoteVoices
  2. Change it to public bool MuteAllRemoteVoices
  3. In a separate script, log out FindObjectOfType<DissonanceComms>().MuteAllRemoteVoices every frame

If that is logging out true you're probably affected by that issue. I can send you the prototype fix to test out in that case.

Ago251 commented 8 months ago

MuteAllRemoteVoices is true. If you can send me the prototype so I can try it

martindevans commented 8 months ago

Thanks for checking that. In the same file as before find CoResumePlayback and replace the entire method with this: https://gist.github.com/martindevans/6fbeb64df5d4e52d04af13a99fb3237e

Ago251 commented 8 months ago

It is works, thank you!

martindevans commented 8 months ago

Excellent! Thanks for confirming that. This fix will be included in the next Dissonance update.