Unable to call FMOD_System_Create() without massive errors

Hey there!

I’m trying to get FMOD to work in my C (not C++) project under Windows 11 with both MSVC and Clang using SDL2 (if that matters). I barely do anything before calling FMOD, so I’m pretty puzzled on what is going on here.

I only call:

FMOD_System_Create(&system, FMOD_VERSION);

Just to be greeted with:

FMOD error: Error initializing output device.

Upon further digging with FMODs debug handlers, I came across this:

ERROR: FMOD_OS_Init()@C:\buildagent2\work\570ad728b1678096\core_api\platforms\win\src\fmod_os_misc.cpp:104║Frame=#0000000║Thread=0x2A1C║
ERROR: FMOD error: CoCreateInstance returned 0x80040154.

I figured this has something to do with OLE32, which is where my knowledge about the Windows API ends.:sweat_smile: Because I have seen this in the examples, I also tried to call:

 CoInitializeEx(0, COINIT_APARTMENTTHREADED); 

But no luck.

Any ideas?

Hi,

A couple of questions:

  • What version of FMOD are you using?
  • Does your device have functioning audio drivers and output devices? There have been issues in the past on OSes with reduced feature sets that remove audio functionality.
  • Are there any other logs from FMOD present?

The error disappeared for some reason when I tried to make a reproduction case. The FMOD version was 2.02, there were no other messages besides the one stated, and I’ve confirmed already that audio was working with other applications while this error occurred.

Happy to hear that the error is seemingly resolved. If you run into any more issues, feel free to let me know!