LittleFS WAV input, I2S output, controlled by Audio Player #454
-
Looking for an example of controlling a LittleFS flash stored WAV file with Audio Player, outputting to I2S. I see a similar issue (SPIFFS support on ESP32? #133), but it isn't clear to me how to explicitly implement the chain and Audio Player. Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I don't think that this makes a lot of sense: There is hardly enough space for one wav file on an ESP32, therefore I do not provide this out of the box. I am not a big fan of LittleFS and SPIFFS and I usually prefer to upload "files" as binary data, e.g. see this example. However you can easily implement your own AudioSource subclass (if you want to use the Audio Player). I suggest that you have a look at the existing file based implementations: e.g. AudioSourceSD. A little FS File is a subclass of Stream, so if you just want to output a single file you can just use it as copy source. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply Phil. I'm using a ProS3 with 16M of flash; the WAV files are relatively short, in the neighborhood of 100K. And I need to persist and manage multiple files, so the binary data approach won't work for my case. Thank you for the pointer to the AudioSource class and SD example. |
Beta Was this translation helpful? Give feedback.
-
I have just added support for the LittleFS to the AudioPlayer. An example can be found here. |
Beta Was this translation helpful? Give feedback.
I have just added support for the LittleFS to the AudioPlayer. An example can be found here.