Set up a valid delayline and a delaylinetap and add them both to the same new channel
Add a synth source to the channel and play 1 note
Expected Results
-Delayline output with tap feedback
Actual Result
-Simulator often crashes on project load (playing the note isn’t even necessary to see this effect). If project loads successfully, pressing the Restart/Reset buttons a few times eventually triggers the crash
-If the project is executed on-device, the Playdate crashes with error e0 when the synth source is played.
Example code:
snd = playdate.sound
local c = snd.channel.new()
local delay = snd.delayline.new(1)
delay:setFeedback(0)
delay:setMix(0.5)
c:addEffect(delay)
local dTap = delay:addTap(0.4)
c:addSource(dTap)
local syn = snd.synth.new()
c:addSource(syn)
syn:playNote("a4", 0.5, 0.1)
function playdate.update()
return 1
end
I have another Windows device that was still running the 2.7.6 simulator, so I decided to check it in that version too. The simulator crashing behavior seems basically the same in 2.7.6, which is to say crashes are intermittent with ~50% occurrence and only seem to happen at (or maybe just after?) project load. If it doesn’t crash when loading, it won’t crash unless I try to restart the Playdate application within the simulator (↻ button; Playdate → Reset; Ctrl+R).
For what it’s worth, when it does load without crashing, the DLT behavior does seem correct in the simulator as far as I can tell.
No data on whether running on device at 2.7.6 causes an e0 stop.
Looks like I forgot to add a reference to the tap to keep it from scoping out while it's in use. I'll fix this for 3.0.2, and for now you can work around it by removing the local to keep a global reference to the tap.