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

FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED returns an empty dict. #272

Open
BurAndBY opened this issue Nov 6, 2024 · 5 comments
Open

FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED returns an empty dict. #272

BurAndBY opened this issue Nov 6, 2024 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@BurAndBY
Copy link

BurAndBY commented Nov 6, 2024

I've recently found this addon and it's really great, but I could not for the life of me figure out how to use callbacks.
This code:

func col(_dict: Dictionary, type: int):
	print(_dict, type)
	
func play_event() -> void:
	if event_instance:
		event_instance.start()
		event_instance.set_callback(col, FmodServer.FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED)

prints out { }8192

and if I turn the col function to have FmodSound as a argument:

func col(_sound: FmodSound, _dict: Dictionary, type: int):
	print(_sound, _dict, type)

the function just does not get called

How do I get the sound returned by the callback?

@CedNaru
Copy link
Member

CedNaru commented Nov 6, 2024

We only have partial support callback events:
Currently the ones implemented are

  • FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
  • FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
  • FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
  • FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT

Each event type needs to be manually implemented, so you can tell us what is your use case so we can add it to the next release.

@BurAndBY
Copy link
Author

BurAndBY commented Nov 6, 2024

We only have partial support callback events: Currently the ones implemented are

* FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND

* FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND

* FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER

* FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT

Each event type needs to be manually implemented, so you can tell us what is your use case so we can add it to the next release.

I need this event callback to integrate with code on sound play and this seems to be the way to do it

@BurAndBY
Copy link
Author

Hello, any updates on this?

@CedNaru
Copy link
Member

CedNaru commented Nov 16, 2024

We are currently working in a new update, mostly fixing the long list of bugs that were found in the past few months.
We also try to add a few new features people are asking for, including yours.
It's just take times, our availability is limited.
So it's coming, but we don't have an ETA for it yet.

@BurAndBY
Copy link
Author

We are currently working in a new update, mostly fixing the long list of bugs that were found in the past few months. We also try to add a few new features people are asking for, including yours. It's just take times, our availability is limited. So it's coming, but we don't have an ETA for it yet.

That's great to hear. I understand everything takes time. Thanks for your work!

@CedNaru CedNaru added this to the 6.x milestone Dec 4, 2024
@CedNaru CedNaru added the enhancement New feature or request label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants