sys.load_resource()is for reading resources in our archive file (aka [custom resources](Working with files))
Beware that loading files from any place isn’t a portable way for all the platforms.
As for loading directly from disc, you can use Lua’s io.* module.
Then you can use the [sound.create_sound_data()](API reference (Resource)) to add it to the engine.
Then set the sound [hash property](API reference (Resource)), and you should be ready to play.
Here’s an example, albeit from streaming from Http:
1 Like