Runtime Ogg Vorbis GDExtension
J

Publisher

jte

Runtime Ogg Vorbis GDExtension

Tools
Audio Ogg Streaming Runtime CrossPlatform GDExtension Playback Compression

This lightweight GDExtension adds static functions for loading Ogg Vorbis files into an immediately usable AudioStreamOggVorbis at runtime, without requiring the files to be imported using Godot Editor first. You may load files by path, or directly from a PackedByteArray buffer in memory, which could for example be used with ZIPReader to play music out of a zip package. Binaries for Windows, Mac, and Linux are provided. Please see README.md for usage details.

Runtime Ogg Vorbis

This GDExtension implements libogg at runtime for Godot 4.1.3

Usage

Static methods:

ResourceLoaderOggVorbis.load(path : String) -> AudioStreamOggVorbis
ResourceLoaderOggVorbis.load_buffer(buffer : PackedByteArray) -> AudioStreamOggVorbis

Call one of the load functions on any path to a loose ogg file or ogg memory buffer to decode it into a usable AudioStream.

Returns null on error.

Your app is responsible for cacheing the returned AudioStream and enabling looping as necessary.

License

This GDExtension is released under a permissive MIT license (see LICENSE.md), but makes use of the OggVorbis software codec source code which is Copyright ©️ 1994-2019 by the Xiph.Org Foundation https://www.xiph.org/