6 #ifndef ADAFRUIT_CPLAY_MIC_H 7 #define ADAFRUIT_CPLAY_MIC_H 10 #define DEPRECATED(func) func __attribute__ ((deprecated)) 11 #elif defined(_MSC_VER) 12 #define DEPRECATED(func) __declspec(deprecated) func 14 #pragma message("WARNING: You need to implement DEPRECATED for this compiler") 15 #define DEPRECATED(func) func 18 #include "Adafruit_ZeroPDM.h" 29 int peak(uint16_t ms) __attribute__ ((deprecated));
30 void capture(int16_t *buf, uint16_t nSamples),
31 fft(uint16_t *spectrum);
36 #if defined(ARDUINO_ARCH_SAMD) 37 static Adafruit_ZeroPDM pdm;
41 #endif // ADAFRUIT_CPLAY_MIC_H Class that stores state and functions for the microphone on CircuitPlayground boards.
Definition: Adafruit_CPlay_Mic.h:26
void capture(int16_t *buf, uint16_t nSamples)
capture the passed number of samples and place them in buf.
Definition: Adafruit_CPlay_Mic.cpp:86
int peak(uint16_t ms) __attribute__((deprecated))
Reads ADC for given interval (in milliseconds, 1-65535). Uses ADC free-run mode w/polling on AVR...
Definition: Adafruit_CPlay_Mic.cpp:66
void fft(uint16_t *spectrum)
AVR ONLY: Performs one cycle of fast Fourier transform (FFT) with audio captured from mic on A4...
Definition: Adafruit_CPlay_Mic.cpp:286
float soundPressureLevel(uint16_t ms)
Returns somewhat-calibrated sound pressure level.
Definition: Adafruit_CPlay_Mic.cpp:203