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

Supporting optional logging to user-provided callback. #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sherief
Copy link
Contributor

@sherief sherief commented Mar 16, 2025

Some users might want to redirect this, or reconcile it with logging from other subsystems in a single sink.

Some users might want to redirect this, or reconcile it with logging from
other subsystems in a single sink.
@flibitijibibo
Copy link
Member

Sadly we can't change the public structs but we can totally add something similar to FNA3D's log rerouting:

https://github.com/FNA-XNA/FNA3D/blob/master/include/FNA3D.h#L496

@sherief
Copy link
Contributor Author

sherief commented Mar 16, 2025

I see, makes sense. Would it be acceptable if I were to add a new struct / function for this?

@flibitijibibo
Copy link
Member

Definitely- we can do FAudio_HookLogFunction(s)EXT and have it be global like FNA3D, so that we don't have to fuss with object lifetime to get logs routed properly.

@sherief
Copy link
Contributor Author

sherief commented Mar 16, 2025

I host multiple instances in the same process and would prefer their output be separated - what do you think is the best path forward here?

@flibitijibibo
Copy link
Member

If you've got an active test case then we can accommodate that - usually I just shotgun blast debug stuff unless somebody has a specific need, so if we need to put a function pointer in the FAudio object that's fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants