Accessing Session Interface Functions

So I’m currently trying to access the Voice Interface for OnlineSubsystemNull, so that I can check if a local player is speaking into their microphone. This is what I have at the moment (called within a PlayerController Class):

return FOnlineSubsystemNull::GetVoiceInterface().IsLocalPlayerTalking(PlayerId)

Visual Studio is telling me that this is an illegal call of non-static member function. However, I don’t understand how I’m supposed to access the function any other way. What should I be doing?

So as it turns out, I was going about it completely the wrong way. Its not a standalone function, its a class variable, so I need to call it with an object of that class.

This is what it should have been:

	IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
	if (OnlineSub)
	{
		IOnlineVoicePtr VoicePointer = OnlineSub->GetVoiceInterface();
		return VoicePointer->IsLocalPlayerTalking(PlayerId);
	}

The problem I face now is getting the valid PlayerId, but that’s a different kettle of fish altogether.

My thanks to this blog, this is what got me the info I wanted.