question

Phillip Heckinger avatar image
Phillip Heckinger asked

How to prevent Voice from initializing? Users report issues.

-Unity 2021.3.21 -Playfab SDK 2.163.230403 (fyi, online build notes dont show up for 2023) -Playfab Party SDK ? 1.7.6.0 ? (I installed it in Feb 2023, but it doesnt say anywhere that I can find the current version number. Please add it to the installed files somewhere.)

By default I set players "mute = true" when they join a lobby. This question is about preventing the Voice system from turning on if a user doesn't want it because its causing issues that are not empowered to be fixed in the Playfab Unity SDK.

I have some users reporting that when the online system turns on (when they open the online menu and it logs in) that it causes microphone issues and audio quality issues for them. I asked them to confirm the "default" hardware is set correctly in their system which they say it is.

One user specifically called out they dont see this issue in any other game and reported their hardware: " am using jabra elite 45h with external mic Hyper X SoloCast and after i press online they will switch to microphone on jabra elite 45h as Hands-Free mode " In a different post they said it puts the system into "call mode" (their words).

Since the Unity Playfab SDK cant change the input/output audio hardware because that api inst public in the Unity SDK, I cant provide a way for users to fix it and the users say they struggle to want to play the game.

QUESTION: Can I prevent the Voice system from ever turning on based on a runtime variable I control?

multiplayer
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Simon Cui avatar image Simon Cui commented ·

Thanks for your report but we cannot reproduce the issue. You can try to implement “player.IsMuted = true; “ when a remote player joined a network. Please let us know if the issue persists.

5803-p1.png Besides, you can find Party SDK version number through {Project Folder}\Assets\PlayFabPartySDK\Source\Scripts\PartyUnitySDK\PlayFabPartyVersion.cs.

0 Likes 0 ·
p1.png (14.1 KiB)
Phillip Heckinger avatar image Phillip Heckinger Simon Cui commented ·

@Simon Cui As you can see in my original post, I highlighted in bold that I am already doing that. I am also not reporting a bug, so there wasnt anything for you to reproduce.

As you can see at the bottom of my original post I am asking a specific question about preventing the audio system from ever initializing. NOT how to turn it off after it initializes.

Can you please provide an answer to the original question. Thanks

0 Likes 0 ·
Phillip Heckinger avatar image Phillip Heckinger commented ·

@Simon Cui The file you reference for version number in the Unity Playfab Party SDK doesnt contain a version number. It just says "Default".

5826-playfabversionnum.png

0 Likes 0 ·
Simon Cui avatar image
Simon Cui answered

You can set PARTY_AUDIO_DEVICE_SELECTION_TYPE.PARTY_AUDIO_DEVICE_SELECTION_TYPE_NONE in both PartyChatControlSetAudioInput and PartyChatControlSetAudioOutput method which is inside {YourProjectName}\Assets\PlayFabPartySDK\Source\Scripts\PartyUnitySDK\PlayFabMultiplayerManager.cs, as the screenshot shown:

5827-p1.png

For more information, please refer to PartyLocalChatControl::SetAudioInput - PlayFab | Microsoft Learn and PartyLocalChatControl::SetAudioOutput - PlayFab | Microsoft Learn.


p1.png (280.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Phillip Heckinger avatar image
Phillip Heckinger answered

As mention in my original post, thats not a solution in this situation because it would turn it off voice for all users. Since that is not a public function in the Unity Playfab SDK, it can't modify at runtime.

Can I prevent the Voice system from ever turning on based on a runtime variable I control?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Simon Cui avatar image
Simon Cui answered

The audio is initialized along with Party SDK, so you cannot prevent initializing audio when you initialize Party SDK.

The PlayFabMultiplayerManager.cs is an encapsulation of low-level Party SDK. You can customize or modify it or create your own PlayFabMultiplayerManager to meet your specific needs. You can create a function with runtime variables and use those two methods of PartyLocalChatControl I mentioned above to control audio input and output.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.