Code Monkey home page Code Monkey logo

gdextension-module's Introduction

GDExtension Module Player

This repository provides an example of real-time Godot 4.2 sound generation by integrating the libxmp-lite module-decoding library in a custom AudioStream with the GDExtension system.

It is mostly a proof of concept, but I'm open to PRs if this proves useful to someone. Note that a pure GDScript module player exists (Godot Mod Player).

Code is based on gdextension-custom-audiostream. Have a look at that project for more details about GDExtension, debugger usage...

Credits & Distribution

This repository includes libxmp as a submodule, in conformance with its MIT license. Scons will include it to the GDExtension library during build.

Public Domain module files are included with this module for testing purpose; see game/CREDITS for details.

Using the Extension

After cloning and building the extension (see below), open game/project.godot in Godot Project Manager, and run it. You'll hear a module being played.

If you test this in the editor, by setting the Playing property to true there, you may get audio glitches. This is due to the fact that editor windows are running with default priority. This will not happen whith a script/game, since thore are run with a higher priority (as can be seen here).

Cloning the Extension

Since this project includes godot-cpp and libxmp as submodules, you'll have to clone it with git clone --recurse-submodules.

Building the Extension

Manual Compilation

To compile the extension you need to follow these steps:

  1. Make sure you cloned the extension recursively as described above

  2. Go to the top level of the project

cd gdextension-module
  1. Compile the extension
scons # this will use the default values such as target=template_debug

VSCode Compilation

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.

gdextension-module's People

Contributors

oparisy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.