当前位置: 首页>>代码示例>>C++>>正文


C++ IOnlineVoicePtr类代码示例

本文整理汇总了C++中IOnlineVoicePtr的典型用法代码示例。如果您正苦于以下问题:C++ IOnlineVoicePtr类的具体用法?C++ IOnlineVoicePtr怎么用?C++ IOnlineVoicePtr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了IOnlineVoicePtr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReceivedBunch

/**
 * Processes the in bound bunch to extract the voice data
 *
 * @param Bunch the voice data to process
 */
void UVoiceChannel::ReceivedBunch(FInBunch& Bunch)
{
	IOnlineVoicePtr VoiceInt = Online::GetVoiceInterface();
	if (VoiceInt.IsValid())
	{
		while (!Bunch.AtEnd())
		{
			// Give the data to the local voice processing
			TSharedPtr<FVoicePacket> VoicePacket = VoiceInt->SerializeRemotePacket(Bunch);
			if (VoicePacket.IsValid())
			{
				if (Connection->Driver->ServerConnection == NULL)
				{
					// Possibly replicate the data to other clients
					Connection->Driver->ReplicateVoicePacket(VoicePacket, Connection);
				}
#if STATS
				// Increment the number of voice packets we've received
				Connection->Driver->VoicePacketsRecv++;
				Connection->Driver->VoiceBytesRecv += VoicePacket->GetBufferSize();
#endif
			}
		}
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:30,代码来源:VoiceChannel.cpp

示例2: UnRegisterAllLocalTalkers

void UAdvancedVoiceLibrary::UnRegisterAllLocalTalkers()
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

	if (!VoiceInterface.IsValid())
	{
		UE_LOG(AdvancedVoiceLog, Warning, TEXT("UnRegister All Local Talkers couldn't get the voice interface!"));
		return;
	}

	VoiceInterface->UnregisterLocalTalkers();
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例3: RegisterLocalTalker

bool UAdvancedVoiceLibrary::RegisterLocalTalker(uint8 LocalPlayerNum)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	return VoiceInterface->RegisterLocalTalker(LocalPlayerNum);
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例4: StopNetworkedVoice

void UAdvancedVoiceLibrary::StopNetworkedVoice(uint8 LocalPlayerNum)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

	if (!VoiceInterface.IsValid())
	{
		UE_LOG(AdvancedVoiceLog, Warning, TEXT("Start Networked Voice couldn't get the voice interface!"));
		return;
	}

	VoiceInterface->StopNetworkedVoice(LocalPlayerNum);
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例5: UnMuteRemoteTalker

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);
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例6: IsPlayerMuted

bool UAdvancedVoiceLibrary::IsPlayerMuted(uint8 LocalUserNumChecking, const FBPUniqueNetId& UniqueNetId)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	return VoiceInterface->IsMuted(LocalUserNumChecking, *UniqueNetId.GetUniqueNetId());
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例7: IsRemotePlayerTalking

bool UAdvancedVoiceLibrary::IsRemotePlayerTalking(const FBPUniqueNetId& UniqueNetId)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	return VoiceInterface->IsRemotePlayerTalking(*UniqueNetId.GetUniqueNetId());
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例8: RemoveAllRemoteTalkers

void UAdvancedVoiceLibrary::RemoveAllRemoteTalkers()
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	VoiceInterface->RemoveAllRemoteTalkers();
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例9: UnRegisterRemoteTalker

bool UAdvancedVoiceLibrary::UnRegisterRemoteTalker(const FBPUniqueNetId& UniqueNetId)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	return VoiceInterface->UnregisterRemoteTalker(*UniqueNetId.GetUniqueNetId());
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:12,代码来源:AdvancedVoiceLibrary.cpp

示例10: IsHeadsetPresent

void UAdvancedVoiceLibrary::IsHeadsetPresent(bool & bHasHeadset, uint8 LocalPlayerNum)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

	if (!VoiceInterface.IsValid())
	{
		bHasHeadset = false;
		UE_LOG(AdvancedVoiceLog, Warning, TEXT("Check For Headset couldn't get the voice interface!"));
		return;
	}

	bHasHeadset = VoiceInterface->IsHeadsetPresent(LocalPlayerNum);
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:13,代码来源:AdvancedVoiceLibrary.cpp

示例11: GetNumLocalTalkers

void UAdvancedVoiceLibrary::GetNumLocalTalkers(int32 & NumLocalTalkers)
{
	IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface();

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

	NumLocalTalkers = VoiceInterface->GetNumLocalTalkers();
}
开发者ID:eternalst0rm,项目名称:ClashOfBalls,代码行数:13,代码来源:AdvancedVoiceLibrary.cpp

示例12: UnregisterVoice

void FOnlineSessionNull::UnregisterVoice(const FUniqueNetId& PlayerId)
{
	IOnlineVoicePtr VoiceInt = NullSubsystem->GetVoiceInterface();
	if (VoiceInt.IsValid())
	{
		if (!NullSubsystem->IsLocalPlayer(PlayerId))
		{
			if (VoiceInt.IsValid())
			{
				VoiceInt->UnregisterRemoteTalker(PlayerId);
			}
		}
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:14,代码来源:OnlineSessionInterfaceNull.cpp

示例13: RegisterLocalPlayers

void FOnlineSessionNull::RegisterLocalPlayers(FNamedOnlineSession* Session)
{
	if (!NullSubsystem->IsDedicated())
	{
		IOnlineVoicePtr VoiceInt = NullSubsystem->GetVoiceInterface();
		if (VoiceInt.IsValid())
		{
			for (int32 Index = 0; Index < MAX_LOCAL_PLAYERS; Index++)
			{
				// Register the local player as a local talker
				VoiceInt->RegisterLocalTalker(Index);
			}
		}
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:15,代码来源:OnlineSessionInterfaceNull.cpp

示例14: RegisterVoice

void FOnlineSessionNull::RegisterVoice(const FUniqueNetId& PlayerId)
{
	IOnlineVoicePtr VoiceInt = NullSubsystem->GetVoiceInterface();
	if (VoiceInt.IsValid())
	{
		if (!NullSubsystem->IsLocalPlayer(PlayerId))
		{
			VoiceInt->RegisterRemoteTalker(PlayerId);
		}
		else
		{
			// This is a local player. In case their PlayerState came last during replication, reprocess muting
			VoiceInt->ProcessMuteChangeNotification();
		}
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:16,代码来源:OnlineSessionInterfaceNull.cpp

示例15: UE_LOG

void UCheatManager::DumpVoiceMutingState()
{
	TSharedPtr<FUniqueNetId> NetId;
	
	UE_LOG(LogCheatManager, Display, TEXT(""));
	UE_LOG(LogCheatManager, Display, TEXT("-------------------------------------------------------------"));
	UE_LOG(LogCheatManager, Display, TEXT(""));

	// Log the online view of the voice state
	IOnlineVoicePtr VoiceInt = Online::GetVoiceInterface(GetWorld());
	if (VoiceInt.IsValid())
	{
		UE_LOG(LogCheatManager, Display, TEXT("\n%s"), *VoiceInt->GetVoiceDebugState());
	}

	// For each player list their gameplay mutes and system wide mutes
	UE_LOG(LogCheatManager, Display, TEXT("\n%s"), *DumpMutelistState(GetWorld()));
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:18,代码来源:CheatManager.cpp


注:本文中的IOnlineVoicePtr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。