Commit e9f28e2b authored by Flore Harlé's avatar Flore Harlé
Browse files

ECC: update the framesize of the audio signal to analyze in tone detector,...

ECC: update the framesize of the audio signal to analyze in tone detector, depending on the chosen sampling rate. The audio sample duration is then always 20 ms.
Showing with 2 additions and 0 deletions
......@@ -136,6 +136,8 @@ static int detector_clear_scans(MSFilter *f, BCTBX_UNUSED(void *arg)) {
static int detector_set_rate(MSFilter *f, void *arg) {
DetectorState *s = (DetectorState *)f->data;
s->rate = *((int *)arg);
s->framesize = 2 * (s->frame_ms * s->rate) / 1000;
ms_message("Tone detector: set rate %d Hz, framesize is %d", s->rate, s->framesize);
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment