Custom AudioStreams documentation code snippets out-of-date & don't compile #9231
Labels
area:contributing
Issues and PRs related to the Contributing/Development section of the documentation
bug
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
The text was updated successfully, but these errors were encountered: