Fileplayer Cuts Off Halfway (2.7.2)

Hello,
I'm using the SDK Version 2.7.2 on my M2 Mac.
Today I've been having trouble with looping a song in my project. It worked fine before I downloaded the new SDK 2.7.2, but now I have noticed that a looped song repeats exactly half way in the song, not at the end of the song like it normally should. I've tried different songs with different lengths and they all have the same problem. I even tried it in a different project and it still happens. Both the simulator and my physical device are both experiencing this problem.
Here's the code:

local song1 = playdate.sound.fileplayer.new()
song1:load("sounds/TestSong")
song1:setVolume(0.5)
song1:play(0)

Could this a bug with the new SDK?

Thanks,
David

I'm experiencing similar but with some of my longer samples in a sampleplayer.

Yeah okay so I went back to 2.7.1 and deleted the pds files from the pdx, then built again, and this time they came out the right size. Something is wrong with 2.7.2.

Is this a stereo ADPCM file exported from Audacity, by chance? It looks like they've got a bug causing the WAV fact chunk to be half the correct size. In 2.7 we added handling of the fact data so that ADPCM files were the correct size when the encoder used a full block at the end instead of truncating it, but got reports of short files and found this problem. In 2.7.3 I have the compiler doubling that fact value if it looks like it's half the size it should be.

3 Likes

Excellent, thanks Dave - I'll use 2.7.1 for now and wait for 2.7.3

1 Like

Yes, thank you! And yes, I am using ADPCM files exported from Audacity. And it looks like I'm running a really old version of Audacity which sounds like that could be the cause? I'll update and see if that fixes it.

Updating Audacity didn't help. I guess I'll just wait for 2.7.3. Thanks for your help!

I had the same issue as well. I could not for the life of me figure out what the issue was, so i re-encoded the music file using a different tool (To Audio Converter) and then it was working for me again on 2.7.2.

1 Like