-
Notifications
You must be signed in to change notification settings - Fork 38
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
FMOD fade-outs #564
FMOD fade-outs #564
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a fix.
channel.stop(); | ||
return false; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
channel.getDelay(out ulong _, out ulong _, out bool stopChannels); | |
if (stopChannels) | |
return false; | |
This prevents unnecessary and conflicting fade points from cluttering the sound channel.
@@ -761,14 +778,22 @@ public static bool FMOD_CustomEmitter_Play_Prefix(FMOD_CustomEmitter __instance) | |||
|
|||
[HarmonyPatch(typeof(FMOD_CustomEmitter), nameof(FMOD_CustomEmitter.Stop))] | |||
[HarmonyPrefix] | |||
public static bool FMOD_CustomEmitter_Stop_Prefix(FMOD_CustomEmitter __instance) | |||
public static bool FMOD_CustomEmitter_Stop_Prefix(FMOD_CustomEmitter __instance, STOP_MODE stopMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Causes #573. This method in BZ doesn't take a STOP_MODE parameter.
Changes made in this pull request
You can add a fade-out point using one of the two methods:
Sound
object when you're creating one. This makes the Sound always fade-out when fading is allowedREQUIRES THOROUGH TESTING