// Microphone capture (ES7210 over I2S) and WAV recording to the microSD card. #pragma once #include bool audioBegin(); // configure codec + I2S, start the capture task bool recorderStart(const char *path); // open WAV file and start capturing void recorderService(); // call often from loop(): drains audio to SD bool recorderStop(); // finish header, close file bool recorderActive(); uint32_t recorderSeconds(); // Prints each microphone's RMS and peak level (dBFS) over `ms` milliseconds. void audioLevelReport(uint32_t ms); // Fills a 44-byte header for a 16 kHz mono 16-bit WAV with dataBytes of PCM. void wavHeader(uint8_t h[44], uint32_t dataBytes);