Advanced Sessions Plugin

Ok, thanks but i’m sorry, the problem persists:
I’ve replaced Unregister by Mute and register by unMute… not effect too. Return always FALSE, first time too. No error in log.
Don’t know what is “is System Wide”
I don’t use steam, but the onlinesubsystem

“ClearVoicePackets() clears the local players queued voice packets, is that what you actually want?” i think i can use it yes.

1 Like

[QUOTE=benicourt;528897]
Ok, thanks but i’m sorry, the problem persists:
I’ve replaced Unregister by Mute and register by unMute… not effect too. Return always FALSE, first time too. No error in log.
I don’t use steam, but the onlinesubsystem

The generic subsystem implements both, are you passing in a bad local player id?

1 Like

I use 0, i thought it was like player controllers… do i have to use another id ?
Need a sound class in VOIP Sound Class Project Settings ?

1 Like

No, it should be the local ID, so 0 should be fine. I don’t understand how you are showing no errors in your log when calling these if they return false, all paths that return false show a log output explaining why both in my plugin and in the functions it calls.

1 Like

Code is:
bool UAdvancedVoiceLibrary::MuteRemoteTalker(uint8 LocalUserNum, const FBPUniqueNetId& UniqueNetId, bool bIsSystemWide)
{
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

if (!VoiceInterface.IsValid())
{
	UE_LOG(AdvancedVoiceLog, Warning, TEXT("Mute Remote Talker couldn't get the voice interface!"));
	return false;
}

return VoiceInterface->MuteRemoteTalker(LocalUserNum, *UniqueNetId.GetUniqueNetId(), bIsSystemWide);

}

VoiceInterface.IsValid() return True but return VoiceInterface->MuteRemoteTalker(LocalUserNum, *UniqueNetId.GetUniqueNetId(), bIsSystemWide); dont raise any error - only return False.

1 Like

I know what my code is ;P, I just don’t know where it is failing for you in Epics codebase.

If you can’t debug step through it then use the MuteRemoteTalker function


	uint32 Return = E_FAIL;
	if (LocalUserNum >= 0 && LocalUserNum < MaxLocalTalkers )
	{
		if (bIsSystemWide)
		{
			SystemMuteList.AddUnique((const FUniqueNetIdString&)PlayerId);
			ProcessMuteChangeNotification();
		}
		else
		{
			// Skip this if the session isn't active
			if (SessionInt && SessionInt->GetNumSessions() > 0 &&
				// Or if voice is disabled
					VoiceEngine.IsValid())
			{
				// Find the specified talker
				FRemoteTalker* Talker = FindRemoteTalker(PlayerId);
				if (Talker != NULL)
				{
					MuteList.AddUnique((const FUniqueNetIdString&)PlayerId);
					Return = S_OK;
					UE_LOG(LogVoice, Log, TEXT("Muting remote talker (%s)"), *PlayerId.ToDebugString());
				}
				else
				{
					UE_LOG(LogVoice, Verbose, TEXT("Unknown remote talker (%s) specified to MuteRemoteTalker()"), *PlayerId.ToDebugString());
				}
			}
		}
	}
	else
	{
		UE_LOG(LogVoice, Warning, TEXT("Invalid user specified in MuteRemoteTalker(%d)"), LocalUserNum);
	}

	return Return == S_OK;

The only path in there that doesn’t throw a LOG Error is this:


			// Skip this if the session isn't active
			if (SessionInt && SessionInt->GetNumSessions() > 0 &&
				// Or if voice is disabled
					VoiceEngine.IsValid())

So if you don’t get a log warning from that function then either there is no session active or the voiceengine is not valid.

Edit Actually if it is set as system wide then it will never assign S_OK to the return and will return false as well…that appears to be a bug in their subsystem.

1 Like

Ok, VoiceEngine.IsValid() because if not there would have a warning in your code : “Mute Remote Talker couldn’t get the voice interface!” - but no warning
So SessionInt && SessionInt->GetNumSessions() <= 0 ? But i can play multiplayer, and hear voices… session seems to be ok… i’m lost…

1 Like

[QUOTE=benicourt;528935]
Ok, VoiceEngine.IsValid() because if not there would have a warning in your code : “Mute Remote Talker couldn’t get the voice interface!” - but no warning
So SessionInt && SessionInt->GetNumSessions() <= 0 ? But i can play multiplayer, and hear voices… session seems to be ok… i’m lost…

VoiceEngine is not the same as the VoiceInterface, also make sure you have bSystemWide off for testing as my edit mentions an apparent bug.

There isn’t any way that you can run debug build and just step through the function? I don’t have a project in 4.11 with server/client set up right now.

Edit Are you trying to test with new editor window with clients or in standalone builds? Created sessions won’t work with editor windows.

1 Like

Ok, if it helps: if i use bRequiresPushToTalk=true in project, i can’t speak
If i launch “StartNetworkedVoice” (play 0) … no result too !
impossible to start voice system manually

Edit: no, that’s functionning out of the editor - not in editor - but same result for mute/unmute

1 Like

I can’t test under editor (head set)- i test with 2 win64 builds

1 Like

[QUOTE=;528943]
There isn’t any way that you can run debug build and just step through the function?

Don’t know how to do that ?

1 Like

[QUOTE=benicourt;528965]
Don’t know how to do that ?

I’m going to package one myself and check first, I don’t know what is going wrong for you right now.

1 Like

Many thanks for your help, it’s very nice.

1 Like

[QUOTE=benicourt;528976]
Many thanks for your help, it’s very nice.

Well work comp doesn’t have a mic and the voice interface is failing to initialize :stuck_out_tongue:

1 Like

I don’t understand… voice is functionning - i can speak and hear - i can’t mute players only ?!

1 Like

[QUOTE=benicourt;529094]
I don’t understand… voice is functionning - i can speak and hear - i can’t mute players only ?!

Well it is obviously calling the code to do so, something is just going wrong in their function. I am not getting the same problem and without being able to reproduce it on my end it is kind of hard to help with. I’ll take a longer look over the weekend when I have the time to launch it across multiple computers with different configurations.

1 Like

Oh, ok, i’ll inquire too. Thanks for your help.

1 Like

Hi Mordental, i’d like to thank you for your help. All is now functionning: UnmuteRemoteTalker and MuteRemoteTalker are functionning. The problem was not here. It was my code. But i don’t know why. I’ve rewritted all these functions, make another project… don’t know why but now it’s good. Thanks again, i’ll add “Joshua Statzer” greetings to my book (french only sorry). Have a nice Week-end.

1 Like

[QUOTE=benicourt;529469]
Hi Mordental, i’d like to thank you for your help. All is now functionning: UnmuteRemoteTalker and MuteRemoteTalker are functionning. The problem was not here. It was my code. But i don’t know why. I’ve rewritted all these functions, make another project… don’t know why but now it’s good. Thanks again, i’ll add “Joshua Statzer” greetings to my book (french only sorry). Have a nice Week-end.

Oh good, I was at a loss for what was going wrong there for awhile.

1 Like

Hi , are you planning on putting this up on the marketplace now that Epic is accepting plugins? I haven’t had to extend my session handling yet due to my game only using dedicated server to host but I do want to extend it in the future with Steam stuff and VOIP, so I look forward to using your plugin in the future.

1 Like