how can i run audio.loop() in a separate task? #340
-
If I run audio.loop() in a separate task, I assume that, being dedicated, the kernel will run the streams without the dropouts due to screen refresh and other tasks. I came to this conclusion after observing that my webradio screen gives small blinks (when I look at the screen tilted) while playing the streams and these blinks occur in sync with the dropouts. (Is my observation correct?) However, I don't know how to deal with task definition. Can you guys help me with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Was this ever resolved? I stumbled over the same issue, that display did not update anymore as soon as the streaming started. I thought about putting some code on a dedicated core, so more or less this solution, but I read it does not work. Or? |
Beta Was this translation helpful? Give feedback.
Hi,
Have a look at:
https://randomnerdtutorials.com/esp32-dual-core-arduino-ide/
The normal core in use in the esp32 is core 1. I suggest to leave it there and put the extra's like display code in core 0. When you use core 0 as the example describes, do not forget to put your 'entire display setup code block' in core 0 (not in setup()!), just after the void "your function name" (void * parameter) code line. Then write the display code just after the for(;;) , which is then the loop-forever in core 0
success
Fre19