| s2 = 0; | s2 = 0; | ||||
| enabled = true; | enabled = true; | ||||
| __enable_irq(); | __enable_irq(); | ||||
| Serial.printf("Tone: coef=%d, ncycles=%d, length=%d\n", coefficient, ncycles, length); | |||||
| //Serial.printf("Tone: coef=%d, ncycles=%d, length=%d\n", coefficient, ncycles, length); | |||||
| } | } | ||||
| float AudioAnalyzeToneDetect::read(void) | float AudioAnalyzeToneDetect::read(void) |
| //const int myInput = AUDIO_INPUT_MIC; | //const int myInput = AUDIO_INPUT_MIC; | ||||
| // each filter requires a set up parameters | // each filter requires a set up parameters | ||||
| // http://forum.pjrc.com/threads/24793-Audio-Library?p=40179&viewfull=1#post40179 | |||||
| // | |||||
| int myFilterParameters[] = { // lowpass, Fc=800 Hz, Q=0.707 | int myFilterParameters[] = { // lowpass, Fc=800 Hz, Q=0.707 | ||||
| 3224322, 6448644, 3224322, 1974735214, -913890679, 0, 0, 0}; | 3224322, 6448644, 3224322, 1974735214, -913890679, 0, 0, 0}; | ||||