Hi,
I’m using this code to load sounds dynamically at runtime.
if message_id == hash("loadsound") then
pprint(message)
local wav = sys.load_resource("/main/bundled_resources/common/"..message.sounddirectory.."/"..message.soundfilename..".wav") --sounds/clock-ticking.wav")
print("Loaded:"..message.soundfilename..".wav")
-- get resource path to the sound component
local resource_path = go.get("/"..message.soundbank.."#"..message.soundbank, "sound")
-- update the resource with the loaded wav file
resource.set_sound(resource_path, wav)
print("new sound ready!")
end
But I’m not getting multiple sounds to play at once when called likely in the same frame. I’m sure it’s some weird thing where I’m not addressing or properly maintaining two sound banks/buffers/objects but I’m not sure much else so far…