Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
8 years ago

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?

5 Replies

Replies have been turned off for this discussion
  • Anonymous's avatar
    Anonymous
    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++.
  • motorsep's avatar
    motorsep
    Start Partner
    Apparently UE4 still doesn't support mic input on Android natively :(
  • motorsep's avatar
    motorsep
    Start Partner


    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.
  • Anonymous's avatar
    Anonymous
    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.