From: Rich Webb on 28 Feb 2010 16:23 On Sun, 28 Feb 2010 10:37:53 -0800 (PST), bigbrownbeastie <bigbrownbeastiebigbrownface(a)googlemail.com> wrote: >>>>#define FLOATING float > >Why for the love of god would you do that! Guessing but probably so that he can more easily port the code between platforms that only offer floats and those with real doubles or long doubles. Might not be best for production but I can see it for test code that's being sampled on assorted processors. -- Rich Webb Norfolk, VA
From: Thad Smith on 26 Mar 2010 23:08 2G wrote: > On Feb 27, 12:10 pm, karthikbalaguru <karthikbalagur...(a)gmail.com> > wrote: >> Hi, >> >> I am looking for an open source implementation >> for decoding DTMF signals using Goertzl Algorithm >> in C language. I searched the internet, but did not >> get an open source implementation in C language. >> I searched the internet and landed in the below link, >> but the 'Listing 1' as mentioned in the contents of >> the below link does not seem to work -http://www.embedded.com/story/OEG20020819S0057 >> Any other links/open source implementation ? .... > It worked for me. Here is Listing 1: > > Listing 1 A Goertzel implementation > > #include <stdio.h> > #include <math.h> > .... It worked after adding the following line: #define PI 3.14159265358979 PI is not defined by the either of the standard headers. -- Thad
From: Ron N. on 26 Mar 2010 22:46 On Feb 27, 1:10 pm, karthikbalaguru <karthikbalagur...(a)gmail.com> wrote: > Hi, > > I am looking for an open source implementation > for decoding DTMF signals using Goertzl Algorithm > in C language. I searched the internet, but did not > get an open source implementation in C language. Note that there is a difference between just using a Goertzel filter, and decoding DTMF. For decoding, there needs to be a decision criteria, so you might want to do a running estimate the average signal power and the noise floor and use those as part of your decision criteria. Also, a Goertzel filter is similar to a 1-bin DFT. And thus if the frequency of interest, or any other strong frequencies present, are non-periodic in the length of the filter, then you may get "leakage artifacts". You might be able to minimize these "artifacts" by pre-windowing the data. Somewhere on my website is an explanation of this 1-bin DFT/Goertzel "leakage": http://www.nicholson.com/rhn/dsp.html IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
From: Tauno Voipio on 27 Mar 2010 05:08 On 27.3.10 5:08 , Thad Smith wrote: > 2G wrote: >> On Feb 27, 12:10 pm, karthikbalaguru <karthikbalagur...(a)gmail.com> >> wrote: >>> Hi, >>> >>> I am looking for an open source implementation >>> for decoding DTMF signals using Goertzl Algorithm >>> in C language. I searched the internet, but did not >>> get an open source implementation in C language. >>> I searched the internet and landed in the below link, >>> but the 'Listing 1' as mentioned in the contents of >>> the below link does not seem to work >>> -http://www.embedded.com/story/OEG20020819S0057 >>> Any other links/open source implementation ? > ... >> It worked for me. Here is Listing 1: >> >> Listing 1 A Goertzel implementation >> >> #include <stdio.h> >> #include <math.h> >> > ... > It worked after adding the following line: > #define PI 3.14159265358979 > > PI is not defined by the either of the standard headers. > Did you try M_PI? -- Tauno Voipio tauno voipio (at) iki fi
From: Thad Smith on 27 Mar 2010 19:50 Tauno Voipio wrote: > On 27.3.10 5:08 , Thad Smith wrote: >> 2G wrote: >>> On Feb 27, 12:10 pm, karthikbalaguru <karthikbalagur...(a)gmail.com> >>> wrote: >>>> Hi, >>>> >>>> I am looking for an open source implementation >>>> for decoding DTMF signals using Goertzl Algorithm >>>> in C language. I searched the internet, but did not >>>> get an open source implementation in C language. >>>> I searched the internet and landed in the below link, >>>> but the 'Listing 1' as mentioned in the contents of >>>> the below link does not seem to work >>>> -http://www.embedded.com/story/OEG20020819S0057 >>>> Any other links/open source implementation ? >> ... >>> It worked for me. Here is Listing 1: >>> >>> Listing 1 A Goertzel implementation >>> >>> #include <stdio.h> >>> #include <math.h> >>> >> ... >> It worked after adding the following line: >> #define PI 3.14159265358979 >> >> PI is not defined by the either of the standard headers. >> > > Did you try M_PI? That's not defined by a Standard C header, either. Either one of those might be defined in a non-conforming compiler, but not Standard C. -- Thad
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: LHC and probability of global death. Next: Accurate Harmonic Analysis |