Answered
0
0

The fmod api for specifying thread affinity is unnecessarily constraining me to only specify a single core.

Note that there is no such restriction on the affinity mask for psv threads in general. The main thread, and all other threads I allocate end up with a mask of 111 so they can be run on any core.

Also note that the ps4 version of this same enum represents bit flags rather than the ‘core index’.

I would propose that this enum should be changed:

// jcf: bad version
/*
typedef enum
{
    FMOD_THREAD_DEFAULT,
    FMOD_THREAD_CORE0,
    FMOD_THREAD_CORE1,
    FMOD_THREAD_CORE2,
    FMOD_THREAD_MAX
} FMOD_THREAD;
*/

// jcf: good version
typedef enum
{
    FMOD_THREAD_DEFAULT = 0,
    FMOD_THREAD_CORE0 = (1<<0),
    FMOD_THREAD_CORE1 = (1<<1),
    FMOD_THREAD_CORE2 = (1<<2),
    FMOD_THREAD_ANYCORE = (1<<0)|(1<<1)|(1<<2),
    FMOD_THREAD_MAX
} FMOD_THREAD;

// jcf: even better, less redundant version
typedef enum
{
    FMOD_THREAD_CORE0 = (1<<0),
    FMOD_THREAD_CORE1 = (1<<1),
    FMOD_THREAD_CORE2 = (1<<2)
} FMOD_THREAD;
  • You must to post comments
Best Answer
0
0

Thanks for the request, I’ll schedule getting the PSVita affinity changed to a mask to match the PS4 one.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.