setRefreshRate is inaccurate with FilePlayer

Hi,

I have a FilePlayer with an mp3 file playing in background and display refresh rate set to 30.
The actual FPS is always below 30, on firmware 1.13.1 I get 25-28 FPS. Without the refresh rate limit, FPS is 40+.

On firmware 1.12.3 the FPS was generally accurate (28-30 FPS).

That's how I setup the FilePlayer:

player = playdate->sound->fileplayer->newPlayer();
playdate->sound->channel->addSource(channel, (SoundSource*)player);
playdate->sound->fileplayer->setStopOnUnderrun(player, 0);
playdate->sound->fileplayer->loadIntoPlayer(player, "song.mp3");
playdate->sound->fileplayer->play(player, 1);

Thanks

1 Like

i've seen this as well in my own game. Game can reach more than the limit but when setting a limit it can never attain it because of the music playing

I haven't had a chance to look into this yet, but it is in the issue tracker, fyi. I'll check it out as soon as I can!

1 Like