X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=c%2Fgoertzel%2Fgoertzel.c;h=3dd5885abaab28df219d368f244a6ffcfe01bc4c;hb=f5c8b03d78139ab03ce177e4e311f16fc5123a46;hp=a26975023f6858367a813670f89d4f2bfc865388;hpb=f1a48c15ae9a0c44ea229911a7523b35d13a0e48;p=mirrors%2FPrograms.git diff --git a/c/goertzel/goertzel.c b/c/goertzel/goertzel.c index a269750..3dd5885 100644 --- a/c/goertzel/goertzel.c +++ b/c/goertzel/goertzel.c @@ -82,7 +82,7 @@ int main(int argc, char ** argv) { int freqs[argc+1]; freqs[0]=-1; int opt; - while ((opt = getopt(argc, argv, "?r:s:f:t:iqna")) != -1) { + while ((opt = getopt(argc, argv, "?d:r:s:f:t:iqna")) != -1) { switch (opt) { case 'r': samplerate = atoi(optarg); @@ -90,6 +90,9 @@ int main(int argc, char ** argv) { case 's': samplecount = atoi(optarg); break; + case 'd': + samplecount = samplerate/atoi(optarg); + break; case 'f': addfreq(freqs, atoi(optarg)); break;