VOIP using blueprints...
I've managed to create and join a session online using blueprints. Is it possible to get VOIP working using blueprints as well? I have managed to get VOIP working using Steam subsystem, but doesn't seem to work when setup for Oculus. I'm just looking for basic audio - nothing spacial right now. Currently testing with UE 4.20.3. & Rift.1.2KViews0likes2CommentsError: Fetching Voip PCM Data
I am trying to gain low level access to Voip data so I can potentially either record the incoming and outgoing voip data separately or potentially combine it and I have been able to successfully integrate voip into my project using the sample StartVoip method defined in the OSSSessionWidget.cpp provided with the Oculus Platform SDK. To retrieve the Voip data I have been trying to use the ovr_Voip_GetPCM and ovr_Voip_GetPCMFloat methods, but I get the following error: Error: Fetching Voip PCM Data I don't have access to the source file so I can't determine why this error is occurring, but I'm pretty sure I'm doing something wrong. Below is my attempt: IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(); IOnlineVoicePtr VoiceInterface = Online::GetVoiceInterface(); IOnlineIdentityPtr IdentityInterface = Online::GetIdentityInterface(); FNamedOnlineSession *Session = SessionInterface->GetNamedSession(NAME_GameSession); TSharedPtr<const FUniqueNetId> UserId = IdentityInterface->GetUniquePlayerId(0); if (Session) { UE_LOG(LogTemp, Warning, TEXT("UOculusVOIP::GetVoipData() - Session is valid")); TArray< TSharedRef<const FUniqueNetId> > SessionPlayers = Session->RegisteredPlayers; UE_LOG(LogTemp, Warning, TEXT("LocalOwnerId: %s"), *Session->LocalOwnerId->ToString()); UE_LOG(LogTemp, Warning, TEXT("UOculusVOIP::GetVoipData() - Fetching Voip PCM Data")); UE_LOG(LogTemp, Warning, TEXT("UOculusVOIP::GetVoipData() - Max Output Buffer Size: %d"), ovr_Voip_GetOutputBufferMaxSize()); ovrID id = 1234567890123456; // example id: either host or client (Oculus User ID) size_t BufferCount = ovr_Voip_GetPCMSize(id); float* OutBufferFloat = (float*)malloc(ovr_Voip_GetOutputBufferMaxSize() * sizeof(float)); int16_t* OutBufferInt = (int16_t*)malloc(ovr_Voip_GetOutputBufferMaxSize() * sizeof(int16_t)); size_t pcmSize = ovr_Voip_GetPCM(id, OutBufferInt, BufferCount); UE_LOG(LogTemp, Warning, TEXT("UOculusVoip::GetVoipData() - ovr_Voip_GetPCM = %d"), pcmSize); // ovr_Voip_GetPCMFloat(id, OutBufferFloat, BufferCount); } else { UE_LOG(LogTemp, Error, TEXT("UOculusVOIP::GetVoipData() - Session is invalid")); } Update - I just discovered the GetRemoteTalkerOutput() method, but it's returning nullptr. It says that it will return null if the VoiceEngine does not support tapping incoming audio.Below is my attempt, but once again I'm probably doing something wrong. Audio::FPatchOutputStrongPtr RemoteOut = VoiceInterface->GetRemoteTalkerOutput(); if (RemoteOut.IsValid()) { int32 SampleCount = RemoteOut->GetNumSamplesAvailable(); float* AudioOutBuffer = (float*)malloc(sizeof(float) * SampleCount); MicOut->PopAudio(AudioOutBuffer, SampleCount, false); UE_LOG(LogTemp, Error, TEXT("RemoteOut Audio Popped")); } else { UE_LOG(LogTemp, Error, TEXT("RemoteOut is invalid")); }767Views0likes1CommentCan Someone Help Me With VOIP Setup in 4.19
I am confused about where and how I am supposed to use the voip methods to register a player as a remote talker in a session. I am assuming that When a player logs in, I should get that players ID and register them as a remote talker on the server. Is that correct? When try something like that, the player that hosts the session is able to register, but the player that joins is not. I also tried calling a RPC on the owning client to register their talker there but that didn't work either. I'm just super confused about where I am supposed to register a player once they have joined a session. Can someone point me in the right direction? I have been working on this for over a week and I can't really find any good documentation on the subject or any good examples. How do I register a player that connects to a session as a remote talker?1.8KViews0likes6Comments