bool UAdvancedVoiceLibrary::UnMuteRemoteTalker(uint8 LocalUserNum, const FBPUniqueNetId& UniqueNetId, bool bIsSystemWide) { IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface(); if (!VoiceInterface.IsValid()) { UE_LOG(AdvancedVoiceLog, Warning, TEXT("Unmute Remote Talker couldn't get the voice interface!")); return false; } return VoiceInterface->UnmuteRemoteTalker(LocalUserNum, *UniqueNetId.GetUniqueNetId(), bIsSystemWide); }
void FPlayerMuteList::ClientUnmutePlayer(APlayerController* OwningPC, const FUniqueNetIdRepl& UnmuteId) { const TSharedPtr<const FUniqueNetId>& PlayerIdToUnmute = UnmuteId.GetUniqueNetId(); // It's safe to remove them from the filter list on clients (used for peer to peer voice) RemoveIdFromMuteList(VoicePacketFilter, PlayerIdToUnmute); // Use the local player to determine the controller id ULocalPlayer* LP = Cast<ULocalPlayer>(OwningPC->Player); if (LP != NULL) { UWorld* World = OwningPC->GetWorld(); IOnlineVoicePtr VoiceInt = Online::GetVoiceInterface(World); if (VoiceInt.IsValid()) { // Have the voice subsystem mute this player VoiceInt->UnmuteRemoteTalker(LP->GetControllerId(), *PlayerIdToUnmute, false); } } }