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

Custom AudioStreams documentation code snippets out-of-date & don't compile #9231

Open
jrburga opened this issue Apr 14, 2024 · 0 comments
Open
Labels
area:contributing Issues and PRs related to the Contributing/Development section of the documentation bug

Comments

@jrburga
Copy link

jrburga commented Apr 14, 2024

Godot Version 4.2

The documentation for Custom AudioStreams has code snippets that are out of date and don't compile when used in a project. Several functions have been renamed or updated with new signatures, and a few methods have been removed entirely.

to name a few...

AudioStreamPlayback

  • void start(float from_pos) -> void _start(double from_pos)
  • void mix(AudioFrame *buffer, float rate_scale, int frames) -> int32_t _mix(AudioFrame *buffer, double rate_scale, int32_t frames)

I'm not going to list everything, but this should give you an idea of what has changed

I ran into this issue when following the documentation while writing C++ code that I'm compiling in a GDExtension.

I was able to rewrite the C++ example code locally to get it to compile correctly. However, I'm not entirely sure how to handle some deprecated methods.

I've included the working header and cpp files that I've written for my GDExtension. Since this is for a GDExtension and not simply engine code, I don't think it would be exactly the same for what should be in the documentation. Unless of course the documentation should be rewritten with GDExtension code in mind.

custom_audio_stream.zip

Custom AudioStreams

@jrburga jrburga added the bug label Apr 14, 2024
@skyace65 skyace65 added the area:contributing Issues and PRs related to the Contributing/Development section of the documentation label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:contributing Issues and PRs related to the Contributing/Development section of the documentation bug
Projects
None yet
Development

No branches or pull requests

2 participants