First, thanks for the amazing work on Teensy and all its libraries - a truly wonderful achievement.
I have Teensy 4.1 and LVGL and dual 240x240 displays working great, taking images from the SD Card with animated GIFs and other animations on the screens.
I also have Teensy Audio playing sounds in the background from waveforms in .h files.
Finally, I have some 3-5 sec WAV files in the SD Card and it can play those on occasion also.
However, what I cannot achieve is showing a GIF animation or updating an image from SD Card at the same time as playing a WAV file. As long as they don't try to use the SD Card together, it seems to hang together. If they try to use it together, they stall each other, just about get through it stutteringly and after a few attempts crashes the SD card and graphics. Interestingly the waveform audio keeps on playing in the background despite everything else including Serial being unresponsive.
I'm trying to show a 3 second GIF animation with sound at the same time.
I'm using
Am I correct to assume that will always struggle with different libraries requesting SD Card access at the same time? (I can play multiple WAV files at the same time Audio only fine.)
Would moving to SDIO help?
I've tried Teensy 4.1 audio on its own with
and that works great and seems smoother and removes a few artifacts on the first ~100ms of the WAV file playback. However, that is not compatible with my LVGL implementation.
If you think that will help, I'll look in to fixing the LVGL - on first attempts it looks challenging (memory allocation and freeing FsFile, seek and other differences).
I did wonder also if it was a shared timer conflict? How can I test for that?
Thanks for any advice. Happy to post my code but its just general advise I'm after first!
(I'm using Platformio, framework-arduinoteensy 1.155.0 (1.55) and LVGL 8.1.)
I have Teensy 4.1 and LVGL and dual 240x240 displays working great, taking images from the SD Card with animated GIFs and other animations on the screens.
I also have Teensy Audio playing sounds in the background from waveforms in .h files.
Finally, I have some 3-5 sec WAV files in the SD Card and it can play those on occasion also.
However, what I cannot achieve is showing a GIF animation or updating an image from SD Card at the same time as playing a WAV file. As long as they don't try to use the SD Card together, it seems to hang together. If they try to use it together, they stall each other, just about get through it stutteringly and after a few attempts crashes the SD card and graphics. Interestingly the waveform audio keeps on playing in the background despite everything else including Serial being unresponsive.
I'm trying to show a 3 second GIF animation with sound at the same time.
I'm using
Code:
SD.begin(BUILTIN_SDCARD);
Am I correct to assume that will always struggle with different libraries requesting SD Card access at the same time? (I can play multiple WAV files at the same time Audio only fine.)
Would moving to SDIO help?
I've tried Teensy 4.1 audio on its own with
Code:
SD.sdfs.begin(BUILTIN_SDCARD);
If you think that will help, I'll look in to fixing the LVGL - on first attempts it looks challenging (memory allocation and freeing FsFile, seek and other differences).
I did wonder also if it was a shared timer conflict? How can I test for that?
Thanks for any advice. Happy to post my code but its just general advise I'm after first!
(I'm using Platformio, framework-arduinoteensy 1.155.0 (1.55) and LVGL 8.1.)