本文整理汇总了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
}
}
}
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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();
}
示例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());
}
示例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);
}
示例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();
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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();
}
}
}
示例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()));
}