aboutsummarylogtreecommitdiffstats
path: root/fmodstudio_fix.c
blob: 5914c7e3acb92988cdb2ff27c3b0d68ba17e8aed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * This is a copy-paste of the code posted in
 * https://github.com/pixelomer/Celeste-ARM64/issues/2 - credit goes to
 * @JohnnyonFlame for figuring this out!
 */

// TODO:: should probably be taken from fmod.h...
#define FMOD_VERSION 0x00020206
#define DECLSPEC __attribute__ ((visibility("default")))
DECLSPEC int _FMOD_Studio_EventInstance_SetParameterValue(void *system, const char *name, float value)
{
        extern int FMOD_Studio_EventInstance_SetParameterByName(void *, const char *, float, int);
        return FMOD_Studio_EventInstance_SetParameterByName(system, name, value, 0);
}

DECLSPEC int _FMOD_Studio_System_Create(void *studiosystem, unsigned int headerversion)
{
        // Override the FMOD_VERSION header.
        extern int FMOD_Studio_System_Create(void *, int);
        return FMOD_Studio_System_Create(studiosystem, FMOD_VERSION);
}