Closed atoktoto closed 3 years ago
Perfect! That is great work!!! Thanks -- really appreciate your pull-requests! :)
@atoktoto... Just let me know if you want me to push a new version to the Arduino Library Manager index...
I don't use Library Manager - I have it pulled as a git submodule.
I added a common class to both
AudioPlayArrayResmp
andAudioPlaySDResmp
to make switching between those two easier. They already shared most of the API. I left theplayWav
andplayRaw
out of the interface and did not change them.This change should be API-compatibile and not add too much of rigidity to the codebase.
The way I use it is to keep 3 pointers side-by-side:
Next, I assign them based on what is needed during construction:
Thanks to this change I can keep the rest of the code independent of the source and only branch out the actual playWav: