Hey there! I'm using the Lua SDK for my video player and noticed something I've never seen before in my tests. When setting a rate above 1 to a
fileplayer, it creates a huge drop of frames on device and the following message in the console:
avoiding fillOutputBuffers recursion
I've attached a simple example (with both the pdx and source) with the following code:
local rate = 1 local audio, audioerr = playdate.sound.fileplayer.new("sample.mp3") audio:play(0) function playdate.update() playdate.drawFPS(0,0) end function playdate.leftButtonDown() if rate > 1 then rate -= 1 audio:setRate(rate) end end function playdate.rightButtonDown() if rate < 4 then rate += 1 audio:setRate(rate) end end
Everything works fine in the simulator. But on device, when getting to a rate above 1, everything slows down way down to 5 FPS. I'm fairly certain this didn't happen when I did a lot of tests last year. Perhaps this is since OS 2.0? Not sure if this is intended and if I should post here or in get help. Any help on how to improve this on my side is appreciated.
fileplayerbug.zip (360.9 KB)