I am trying to solve a problem with the game Grand Theft Auto 5 (and perhaps other games) in how it interacts with Dolby Access virtual spatial sound. The problem is that when GTA 5 is launched, it is setting the spatial sound format to Off. The spatial sound format can only be changed in two ways:
manually by the user in Windows settings, or
by the ISpatialAudioClient::GetMaxDynamicObjectCount function for dynamic objects returned by an application (resulting in 0 for GTA 5 in this case).
So essentially, I need help forcing Windows into always treating the "dynamic objects" as always having a static value returned on call.
I am a beginner with C++, trying to make a Console App. The code is as follows:
#include <spatialaudioclient.h>
int main() {
HRESULT ActivateSpatialAudioObject(
AudioObjectType AudioObjectType_AudioObjectType_Dynamic,
ISpatialAudioObject **audioObject
);
HRESULT GetMaxDynamicObjectCount(
UINT32 * 1
);
HRESULT OnAvailableDynamicObjectCountChange(
ISpatialAudioObjectRenderStreamBase * sender,
LONGLONG 0,
UINT32 1
);
}
Am I on the right track?