Hi,
i fixed a minor issue (along with some other very minor details) where, for aiff, 4 zero where inserted before playing the file.
I'm now very sure, that the waveplayer does not produce any clicks when starting a file. Only, probably, when the card is too slow re: opening files.
So, if there are clicks, either the card, or the samples are the reason.
It helps
a) to use a fast card,
b) to increase the AUDIO_BLOCK_SAMPLES (256 should be enough)
c) use small directories with a few files,
The player is not responsible for slow accesses, if appearend, and I can't do anything.
The, I tried to create better samples, but my ffmpeg knowlage is limited - and after 2 hours I decided to leave them as they are. My new files had other issues (too short) It has nothing todo with the player, so... i'll leave it for others. The link to the used samples is given in the sourcecode of the example. The main problem with the originals is the long pause at start.
I hope someone with more patience does a PR
Have fun,
Frank
p.s. Here are 2 ffmpeg commands i used. maybe they are useful:
Code:
volume:
ffmpeg -i %%i -af volume=1.1 conv\%%i
remove silence:
ffmpeg -i %%i -af silenceremove=start_periods=1:start_silence=0.01:start_threshold=-50dB,areverse,silenceremove=start_periods=1:start_silence=0.5:start_threshold=-60dB,areverse conv\%%i
%%i is the filename. You need to tune the used parameters.
p.s.s:
You can just measure the time the time for opening. use micros() to measure the time for open(filename).
I had times well below 2.9ms (usually around..1.5ms) - and very rarely around 3ms. A 128 sample Audioblock is 2.9ms. So, with 256, you're on the safe side.
p.s.ss: No need to try littlfs on external flash (qspi) It's dead slow and often had times > 20ms when I measured this some months ago.
I did not see any hint that this was fixed.