Skip to main content
November 1, 2018

VOIP in SDK...

Trying to get the VOIP working by using some c++ from the SDK sample. I'm not too familiar with c++, so it is just a bit of a hack job. I use blueprint to create and join a session, then I've created a BlueprintCallable function that I call in the player controller. Here is the meat of the .cpp (straight from SDK sample):

<CODE>
void UOSSSessionBP::StartVoip(FName SessionName)
{
auto OculusSessionInterface = Online::GetSessionInterface();
auto OculusVoiceInterface = Online::GetVoiceInterface();
auto OculusIdentityInterface = Online::GetIdentityInterface();

auto Session = OculusSessionInterface->GetNamedSession(SessionName);
auto UserId = OculusIdentityInterface->GetUniquePlayerId(0);

if (Session)
{
OculusSessionInterface->StartSession(SessionName);//

auto RegisteredPlayers = Session->RegisteredPlayers; //get list of players in the session

for (auto RegisteredPlayer : RegisteredPlayers)
{
//don't register the local player, only the remote
if (RegisteredPlayer.Get() != *UserId.Get())
{
OculusVoiceInterface->RegisterRemoteTalker(RegisteredPlayer.Get());
OculusVoiceInterface->StartNetworkedVoice(0);
UE_LOG_ONLINE(Display, TEXT("Registered a Talker: %s"), *RegisteredPlayer.Get().ToString());
}
}
}
}
</CODE>

Problem is, I don't know how to get the SessionName. Since I create the session using blueprints, I don't know what name it is given or how to get at it. Any suggestions in getting the SessionName or alternate ways to get an array of FUniqueNetIdOculus?
    This topic has been closed for replies.

    5 replies

    November 6, 2018
    I've read the Unreal VOIP documentation. My knowledge of C++ is limited. How do I get the array of players in the session and their corresponding FUniqueNetIdOculus? The example in the SDK gets the array using the SessionName. Since I am creating the session via blueprints, I don't know how to get the SessionName via c++.
    Inspiring
    November 19, 2018
    Apparently UE4 still doesn't support mic input on Android natively :(
    November 19, 2018
    actually it does work since quite a while (mic capturing on Android). It worked pretty well last time I tested it on 4.18 or something similar but it appears there is a bug with it now on the 2nd app load:


    no idea why it wouldn't work the second time but the fact it works on the first load shows it should be working in general ;)

    Inspiring
    November 19, 2018


    actually it does work since quite a while (mic capturing on Android). It worked pretty well last time I tested it on 4.18 or something similar but it appears there is a bug with it now on the 2nd app load:


    no idea why it wouldn't work the second time but the fact it works on the first load shows it should be working in general ;)



    He made that input, it's not Epic's implementation.
    November 20, 2018
    Ah ok bad link - I was testing the Epic implementation when it was first added and I could have sworn was working for me. Can't find a link to it now unforutunately but it was definitely working back then.