Nino
(Gravity Express)
1
When trying to play the attached file, with the following code:
self.player, err = playdate.sound.fileplayer.new("music/scifi_adpcm.wav")
print("player", self.player, err)
I get player nil Couldn't load file at music/scifi_adpcm.wav: No error
The docs seem to suggest fileplayer can play adpcm.
Swapping fileplayer for sampleplayer works just fine
scifi_adpcm.wav.zip (2.3 MB)
matt
(gingerbeardman)
2
try removing the .wav file extension in your code?
The .wav will be converted to a .pda file
Nino
(Gravity Express)
3
That's it. The api is quite inconsistent in this regard, so I tend to get confused or forget
- mp3 fileplayer: both with and without extension work
- midi sequence: requires extension
- adpcm fileplayer: extension must be omitted
- adpcm sampleplayer: both with and without extension work
2 Likes
matt
(gingerbeardman)
4
Yes, I agree. A very common gotcha