adding the duration parameter to the led flash routine returned a strange effect.
I changed the duration from zero to 100 msec to have a shorter flash effect
// Flash all LEDs from a value of 255 to 100, frequency 20Hz, 100ms duration blue.flash(255, 100, 20, 100); red.flash(255, 100, 20, 100); green.flash(255, 100, 20, 100);
Now if you do the effect, you see that after the flash, the blue led is OFF and the green and red leds are at the normal brightness value, until the audio file is played, then it returns to normal.
I hid the problem changing the code from
But my concern is on the core routine.