-
Notifications
You must be signed in to change notification settings - Fork 49
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
FmodNative signals not firing? #129
Comments
Hum, I have actually never tested that signal properly in the demo project. I don't see why it would be an issue with Godot 3.5. Most likely it has been there all this time. Here I'm directly testing the type of the event callback with a "==" because I thought I just needed to test a single enum value. But it's actually a bitfield, meaning that if any other callback is active at the same time, the equality check will not work. What probably happens is that the sound starts playing at the same time the event starts as well, making the equality return False. |
After investigating more, it seems that what I said was wrong. The type of calllback is not a mask. If there are several callbacks to be called, it's going to be one for each according to the documentation.
I rechecked your project and the issue comes from never calling In that function you can pass a mask of the different kind of callback you want or just use the "ALL" like in the example. The Fmod API normally allows to set the default callback behavior we want for a given Event Description but I have never implemented it so I guess I can just do that. it would look like something like:
What do you think ? |
@CedNaru perhaps we could enable that ALL flag by default. |
I'm not fond of overriding Fmod default behavior (no callback at all) without user knowledge. As a compromise, we can add a system level flag that would be used for all Event instances if not set with the regular |
Hello! For some reason, I can't receive any signals from the FmodNative class ("sound_played," "sound_stopped," etc).
External scripts haven't received the signal from the Fmod singleton. I tried editing the singleton's script to make sure the _on_sound_stopped() function was being called in the first place, but it never seemed to fire.
I re-downloaded the latest release (v3.1.1), created a new Godot 3.5 project, and made a simple script to play a one-shot sound. The script also connects to the sound_played and sound_stopped signals, and should print the name of the signal once called. It never receives the signals.
It's possible this is a Godot 3.5-specific issue - I haven't had the chance to try a new 3.4 project.
Is this a bug, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: