mirror of
https://github.com/Risensy/Steam.git
synced 2025-10-22 16:04:19 +00:00
24 lines
563 B
C++
24 lines
563 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "VOIPLIB.h"
|
|
|
|
void UVOIPLIB::ClearVoicePackets(UObject* WorldContextObject)
|
|
{
|
|
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
|
|
if (!IsValid(World))
|
|
{
|
|
return;
|
|
}
|
|
|
|
IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface(World);
|
|
|
|
if (!VoiceInterface.IsValid())
|
|
{
|
|
UE_LOG(LogTemp, Warning, TEXT("Clear voice packets couldn't get the voice interface!"));
|
|
}
|
|
|
|
VoiceInterface->ClearVoicePackets();
|
|
|
|
}
|