diff options
| author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-06-19 21:09:47 +0200 |
|---|---|---|
| committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-06-19 21:09:47 +0200 |
| commit | d8df88e8b299fe697ff695f61cd1e85032530a84 (patch) | |
| tree | b69a0d674e4775ff14b0b8f107e91e70b6827479 /src/common | |
| parent | 9076fd7a7cef6bde83bdf52d41e45a3e0d540a2f (diff) | |
| download | glutte-o-matic-d8df88e8b299fe697ff695f61cd1e85032530a84.tar.gz glutte-o-matic-d8df88e8b299fe697ff695f61cd1e85032530a84.tar.bz2 glutte-o-matic-d8df88e8b299fe697ff695f61cd1e85032530a84.zip | |
Widen frequency range of tone test
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/src/Audio/tone.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/src/Audio/tone.c b/src/common/src/Audio/tone.c index 2cd97a9..60226ce 100644 --- a/src/common/src/Audio/tone.c +++ b/src/common/src/Audio/tone.c @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2018 Maximilien Cuony + * Copyright (c) 2018 Maximilien Cuony, Matthias P. Braendli * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -40,10 +40,10 @@ static struct tone_detector detector_1750; int TONE_1750_DETECTED = 0; static void init_tone(struct tone_detector* detector, int freq, int threshold) { - detector->coef = 2.0 * arm_cos_f32(2.0 * FLOAT_PI * freq / AUDIO_IN_RATE); + detector->coef = 2.0f * arm_cos_f32(2.0f * FLOAT_PI * freq / AUDIO_IN_RATE); detector->Q1 = 0; detector->Q2 = 0; - detector->threshold = threshold ; // 200000; + detector->threshold = threshold; detector->num_samples_analysed = 0; } |
