Answered
0
0

In fmorbis.h the enum value FMOD_THREAD_MAX is incorrect.

typedef enum
{
    FMOD_THREAD_DEFAULT, 
    FMOD_THREAD_CORE0 = 1 << 0,
    // ...
    FMOD_THREAD_CORE5 = 1 << 5,
    FMOD_THREAD_MAX
} FMOD_THREAD;

The enum should really be…

typedef enum
{
    FMOD_THREAD_DEFAULT, 
    FMOD_THREAD_CORE0 = 1 << 0,
    // ...
    FMOD_THREAD_CORE5 = 1 << 5,
    FMOD_THREAD_ANYCORE = ... (bit-or all previous enum values),
    FMOD_THREAD_MAX
} FMOD_THREAD;

As a result of its current value, fmod returns ‘invalid parameter’ if you try to set a cpu affinity mask for FMOD_THREAD_CORE0|1|2|3|4|5, even though that is a valid affinity mask.

  • You must to post comments
Best Answer
0
0

You are correct, FMOD_THREAD_MAX should not be there, it’s left over from when the enum was for individual threads instead of a mask. I’ll get that removed for a future release.

I can confirm that ORing core 0 through 6 together does indeed work. Perhaps you were getting the error because some of the members of the affinity struct were undefined. Ensure you set all values or memset to 0 first.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.