x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Voice Chat: CreateVoiceCapture() returning Null

I'm trying to implement voice chat on Windows and the following code (copied from TestVoice.cpp) results in VoiceCapture, VoiceEncoder and VoiceDecoder being Null, making the IsValid call return false:

 #include "OnlineSubsystemUtils.h"
 #include "VoiceController.h"
 #include "Engine.h"
 #include "Voice.h"

 ...

 bool AVoiceController::Init()
 {
     UE_LOG(LogTemp, Warning, TEXT("VoiceController Init"));
 
     VoiceCapture = FVoiceModule::Get().CreateVoiceCapture();
     VoiceEncoder = FVoiceModule::Get().CreateVoiceEncoder();
     VoiceDecoder = FVoiceModule::Get().CreateVoiceDecoder();
 
     if (VoiceCapture.IsValid())
     {
         UE_LOG(LogTemp, Warning, TEXT("VoiceController Init is valid"));
         VoiceCapture->Start();
     }
 
     return true;
 }

 ...

Does anybody have any ideas why this may be happening?

Edit: I'm calling Init on event begin play.

Product Version: Not Selected
Tags:
more ▼

asked Jan 04 '15 at 01:18 AM in C++ Programming

avatar image

haydenjameslee
6 1 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Solved the issue. I had forgotten to add the following config lines as specified in this post.

DefaultEngine.ini

 [Voice] 
 bEnabled=true
  
 [OnlineSubsystem] 
 bHasVoiceEnabled=true

DefaultGame.ini

 [/Script/Engine.GameSession]
 bRequiresPushToTalk=false


more ▼

answered Jan 04 '15 at 05:29 AM

avatar image

haydenjameslee
6 1 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question