Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing chatter bits and stack corruptions #2

Closed
JohnnyonFlame opened this issue Mar 18, 2022 · 0 comments
Closed

Missing chatter bits and stack corruptions #2

JohnnyonFlame opened this issue Mar 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@JohnnyonFlame
Copy link

Hello,

Found your solution while checking out the status of fmod1.x for aarch64 - this function is wrong and will cause major graphical corruptions, missing sounds and other brokenness - you want to change this to FMOD_Studio_EventInstance_SetParameterByName instead.

I ended up with a solution that is a tiny bit less intrusive and avoids patches:

// 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);
}

which can be used with the following config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<dllmap dll="fmod" os="linux" target="libfmod.so.13"/>
	<dllmap dll="fmodstudio" os="linux" target="libfmodstudio.so.13">
		<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_EventInstance_SetParameterValue" target="_FMOD_Studio_EventInstance_SetParameterValue"/>
		<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_System_Create" target="_FMOD_Studio_System_Create"/>
		<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_System_GetLowLevelSystem" target="FMOD_Studio_System_GetCoreSystem"/>
		<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_EventInstance_TriggerCue" target="FMOD_Studio_EventInstance_KeyOff"/>
	</dllmap>
</configuration>
@pixelomer pixelomer added the bug Something isn't working label Feb 4, 2023
pixelomer added a commit that referenced this issue Jun 2, 2024
Changes based on #2

fixes #7, fixes #13, fixes #14, fixes #15, closes #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants