discord_luau/symphonia
v0.0.2 ·
Discord Luau Symphonia - FFI bindings for libsymphonia, decoding audio files to 48 kHz stereo PCM and passing Opus through.
Decodes audio files and streams to 48 kHz stereo PCM, through a small Rust wrapper around Symphonia.
Source: packages/symphonia
Installation
pesde add discord_luau/symphonia
Example
local symphonia = require("./luau_packages/symphonia")
local decoder = symphonia.decoder.fromFile("song.flac")
while true do
local pcm = decoder:read()
if not pcm then
break
end
end
decoder:destroy()
Runs on Zune. Each read returns about 100 ms of 16-bit stereo PCM.
Full documentation at discordluau-docs.devcomp.workers.dev.
Contributing
Contributions are welcome via the repository at github.com/DiscordLuau/discord-luau.
License
This package is licensed under the MIT License.