I’m not going to be able to help too much with the actual creation of the Mac audio output, but I can help with the Opus encoding/decoding and the transmission of voice over the connection.
At present voice depends greatly on the proper setup of your online session through create/join session. UserIds must be registered with all parties in order for voice to work.
You can do **DumpOnlineSessionState **on all clients/servers to see the status of the sessions and player registration.
You can do DumpVoiceMutingState, as you have seen, to see what players are registered with the voice system. Anyone not listed there probably can’t speak/hear anyone listed there.
**OnlineSubsystemNULL **provides only a basic mock interface/functionality but still has enough to provide unique UserIds per player and should go through the session/voice registration flow.
It might be useful to provide the dump output here so we can take a look. Also in the logs on all clients/servers, if you unsuppress LogVoice, are notifications for **RegisterRemoteTalker **and RegisterLocalTalker. These calls must be made for voice to work
Now with push to talk disabled, there should be a call to **StartNetworkedVoice **which is also logged via LogVoice. This is called by **ToggleSpeaking **or more importantly ClientEnableNetworkVoice which is called in PostLogin of the AGameMode.
If you follow some of these paths, you should be able to determine whether the network code is setup properly to transmit voice. Let me know where any shunting or early outs occur and we can address that.
You can also #define VOICE_LOOPBACK 1 in VoiceInterface.h to have the local data piped back into the “received remote packet” flow. You should then hear exactly what you’re sending.
The core “transmit voice” code flow is
Client sending voice traffic:
// Generate local packets
FOnlineVoiceImpl::ProcessLocalVoicePackets
FVoiceEngineImpl::ReadLocalVoiceData
// Send any local packets queued
UNetDriver::ProcessLocalServerPackets
UNetDriver::ProcessLocalClientPackets
UNetDriver::ReplicateVoicePacket
UVoiceChannel::Tick
Client Receiving voice traffic:
// Packet received
UVoiceChannel::ReceivedBunch
// Packet put on remote voice queue
FOnlineVoiceImpl::SerializeRemotePacket
// Process remote packets
FOnlineVoiceImpl::ProcessRemoteVoicePackets
FVoiceEngineImpl::SubmitRemoteVoiceData