0

I am just about ready to release my first little game with my game engine. However, through having some people test it, we found that the call to acquire the pointer to the AudioEngine interface fails for one of my testers.

The call works fine for me on both my desktop and my laptop, and it works fine on tester 2's computer. However, tester 1's computer will not succeed on the call.

By "fails" I mean it throws an exception which I am handling with a try/catch block. The "what" of the exception just tells me "AudioEngine" so no help there. He has a heavily customized computer which utilizes two graphics cards which are not linked and handle separate tasks. He uses the same Virtual Audio Cable set up that I have on my Desktop (used to separate voice sources for easier video editing re: streaming/game recording).

If anyone has any clue what might cause this call to fail, we would greatly appreciate the information. Please let me know if you require any additional information. Code for initialization is below:

//aud engine declaration is in the header for the class
unique_ptr<AudioEngine> audEngine;

//function being called
bool AudioEngineClass::InitializeAudioEngine()
{
//Call this to create the DXTK Audio Engine

//Setup flags:
AUDIO_ENGINE_FLAGS eflags = AudioEngine_Default;

eflags = eflags | AudioEngine_EnvironmentalReverb | //Enables environmental reverb for 3D (required for 3D audio)
                  AudioEngine_ReverbUseFilters | //Enables additional features for 3D positional audio reverb
                  AudioEngine_UseMasteringLimiter; //Enables a mastering volume limiter to avoid distortion and clipping with 3D audio.

//MessageBox(NULL, "Attempting to assign AudioEngine Pointer", "AudioEngine.InitializeAudioEngine", MB_OK);

try 
{
    audEngine = make_unique<AudioEngine>(eflags);
}
catch(exception& e)
{
    //Tester 1 falls into this

    string exceptionStr = e.what();
    string outputStr = "Failed to Initialize Audio Engine. Exception: \n";
    outputStr += exceptionStr;
    MessageBox(NULL, outputStr.c_str(), "AudioEngine.InitializeAudioEngine", MB_OK);
}

//MessageBox(NULL, "Got past AudioEngine Pointer Assignment", "AudioEngine.InitializeAudioEngine", MB_OK);

if (!audEngine)
{
    //failed to create audio engine.
    initialized = false;
}
else
{
    initialized = true;
}


return initialized;
}

UPDATE: Been trying stuff all day with no luck so far. -Had Tester download the June 2010 DirectX DLLs and install them and restart their computer. -Had them update all of their drivers. -Had them check their System folder (all XAudio2_#.dll files are present). -They have Windows 10

GaleRazorwind
  • 229
  • 2
  • 7
  • There's only one place in the [source](https://github.com/microsoft/DirectXTK/blob/master/Audio/AudioEngine.cpp) that throws that exceptions, and it's fairly generic initialization failure. If you can get them a "DEBUG" build of the library, there's additional debug output that would contain the HRESULTs involved. – Chuck Walbourn Jul 05 '19 at 08:11
  • Thanks, Chuck. I will have him get me the debug output and see what happens. – GaleRazorwind Jul 05 '19 at 20:43

0 Answers0