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

UpdateAudioStream and SetAudioStreamCallback #279

Closed
maxpoletaev opened this issue Sep 11, 2023 · 2 comments
Closed

UpdateAudioStream and SetAudioStreamCallback #279

maxpoletaev opened this issue Sep 11, 2023 · 2 comments

Comments

@maxpoletaev
Copy link

There are currently two methods of updating audio streams in vanilla raylib: pushing it with UpdateAudioStream or setting a callback with SetAudioStreamCallback so that raylib can request new samples once the buffer is empty. I see that current raylib examples rely on SetAudioStreamCallback. However, I've noticed that the latter isn't yet implemented in raylib-go.

I'm curious if there's any significant difference between these two? I'm currently facing some weird audio synchronization issues and am wondering if the callback approach might be better somehow. If so, do you think it would be difficult to add a wrapper for SetAudioStreamCallback to raylib-go?

@gen2brain
Copy link
Owner

The callbacks in Go can be a real pain, and there are not many places in Raylib where they are used. If there is not an important reason to implement one I would prefer not to include it. If there is any significant difference between these two can tell us someone who can test both ways in some test example.

gen2brain added a commit that referenced this issue Nov 8, 2023
@gen2brain
Copy link
Owner

SetAudioStreamCallback added in 9f257fc. It is not tested, if there are issues please report.

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

No branches or pull requests

2 participants