Changeset 5548:73e43db30a1c in roaraudio


Ignore:
Timestamp:
06/17/12 23:07:36 (5 years ago)
Author:
phi
Branch:
default
Message:

Added filter based on Goertzel algorithm

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5546 r5548  
    77        * Improved error handling (including on win32) (Closes: #235) 
    88        * Added small DTMF library. 
     9        * Added filter based on Goertzel algorithm. 
    910 
    1011v. 1.0beta2 - Wed Jun 06 2012 19:56 CEST 
  • include/libroardsp/filter.h

    r5469 r5548  
    5555#define ROARDSP_FILTER_NOISEGATE      13 
    5656#define ROARDSP_FILTER_RESPONSE_CURVE 14 
     57#define ROARDSP_FILTER_GOERTZEL       15 
    5758 
    5859// filter CTLs: 
  • include/libroardsp/filters.h

    r5381 r5548  
    198198int roardsp_responsecurve_ctl   (struct roardsp_filter * filter, int cmd, void * data); 
    199199int roardsp_responsecurve_reset (struct roardsp_filter * filter, int what); 
     200 
     201int roardsp_goertzel_init  (struct roardsp_filter * filter, struct roar_stream * stream, int id); 
     202int roardsp_goertzel_uninit(struct roardsp_filter * filter); 
     203int roardsp_goertzel_calc32(struct roardsp_filter * filter, void * data, size_t samples); 
     204int roardsp_goertzel_calc16(struct roardsp_filter * filter, void * data, size_t samples); 
     205int roardsp_goertzel_calc8 (struct roardsp_filter * filter, void * data, size_t samples); 
     206int roardsp_goertzel_ctl   (struct roardsp_filter * filter, int cmd, void * data); 
     207int roardsp_goertzel_reset (struct roardsp_filter * filter, int what); 
    200208#endif 
    201209 
  • libroardsp/Makefile

    r5546 r5548  
    77OBJS=libroardsp.o convert.o midside.o poly.o filter.o filterchain.o remove.o transcode.o vio_transcode.o rms.o fader.o mixer.o amp.o interleave.o channels.o resampler_poly3.o float.o dtmf.o 
    88OLDROAR=midi.o 
    9 FILTER=filter_lowp.o filter_highp.o filter_amp.o filter_quantify.o filter_add.o filter_clip.o filter_downmix.o filter_dcblock.o filter_swap.o filter_agc.o filter_speex_prep.o filter_responsecurve.o 
     9FILTER=filter_lowp.o filter_highp.o filter_amp.o filter_quantify.o filter_add.o filter_clip.o filter_downmix.o filter_dcblock.o filter_swap.o filter_agc.o filter_speex_prep.o filter_responsecurve.o filter_goertzel.o 
    1010MIDI=synth.o 
    1111CODECS=alaw.o mulaw.o 
  • libroardsp/filter.c

    r5381 r5548  
    7575           {NULL, NULL, NULL},{roardsp_responsecurve_calc32, NULL, NULL} 
    7676 }}, 
     77 {ROARDSP_FILTER_GOERTZEL, "Goertzel", roardsp_goertzel_init, roardsp_goertzel_uninit, 
     78                                       roardsp_goertzel_ctl, roardsp_goertzel_reset, { 
     79           {NULL, NULL, NULL},{roardsp_goertzel_calc8, NULL, NULL},{roardsp_goertzel_calc16, NULL, NULL}, 
     80           {NULL, NULL, NULL},{roardsp_goertzel_calc32, NULL, NULL} 
     81 }}, 
    7782#endif 
    7883 {-1, NULL, NULL, NULL, NULL, NULL, { 
Note: See TracChangeset for help on using the changeset viewer.