0
0

I’m hoping to find some more background on this error. I couldn’t find anything in the forum or anywhere, for that matter. The error string is as descriptive as it can be, but it still doesn’t give me any leads. I’m trying to get a handle of what it is that I’m doing that could be contributing to this before I post any non-sensical code. My app makes a lot of use of multi-threading, so maybe that’s a suspect, but I’m shooting in the dark.

Here’s the line of code that causes it (C#):
[code:sj7kan9i]
m_system.createSound(fileName, (FMOD.MODE._2D | FMOD.MODE.HARDWARE | FMOD.MODE.CREATESTREAM | MODE.ACCURATETIME), ref createSoundExInfo, ref sound));
[/code:sj7kan9i]

createSoundExInfo has decodebuffersize set, sound is a Sound.

Thanks for anything. Since I didn’t find anything in the forum on this, if I find the answer I will post it here for others’ future reference.
(using fmodex 4.0.4.24)

  • You must to post comments
0
0

Does it work in software mode?

  • You must to post comments
0
0

Same result.

Something I just found…I rolled back to my 4.0.4.10 binary and I still get the error, but it is still able to play the sound. Eh, probably nothing.

  • You must to post comments
0
0

For posterity…

The short answer:
It was making the createSound call on a different thread than the System object (assuming) was created on. The System object was created in the UI thread, the createSound call was a TCP listener background thread. Once I had the caller check InvokeRequired and delegate back to the UI thread, the COM error went away.

So ERR_COM = check your threading.

  • You must to post comments
0
0

Glad you found the problem kc. As you found out, FMOD’s not guaranteed to work safely when called from multiple threads.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.