This repository provides an example of defining a custom AudioStream
for Godot 4.2 with its GDExtension system.
It is based on the Custom AudioStreams tutorial for Godot modules.
The template for the GDExtension mechanism is paddy-exe's excellent GDExtensionSummator. Have a look at that project for more details about GDExtension, debugger usage...
Since this project includes godot-cpp
as a submodule, you'll have to clone it with git clone --recurse-submodules
.
After building the extension successfully (see below), open game/project.godot
in Godot Project Manager, and run it. You'll hear a generated sine wave being played.
For the initial build you can run the vscode task initial-build-extension
. This compiles both godot-cpp and the extension. For all subsequent builds, you only need to run the task build-extension
.
To compile the extension you need to follow these steps:
-
Make sure you cloned the extension recursively as described above
-
Go to the top level of the project
cd gdextension-custom-audiostream
- Compile the extension
scons # this will use the default values such as target=template_debug