Changeset 1100:aac17d20aea1 in roaraudio


Ignore:
Timestamp:
01/02/09 23:18:26 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added DC block with f_e=~5Hz

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • include/libroardsp/libroardsp.h

    r1004 r1100  
    4444#define ROARDSP_FILTER_ADD            7 
    4545#define ROARDSP_FILTER_DOWNMIX        8 
     46#define ROARDSP_FILTER_DCBLOCK        9 
    4647 
    4748// filter CTLs: 
     
    6263#define ROARDSP_DOWNMIX_ARITHMETIC    3 
    6364#define ROARDSP_DOWNMIX_RMS           4 
     65 
     66#define ROARDSP_DCBLOCK_NUMBLOCKS     100 
    6467 
    6568// types: 
     
    9699 int32_t  mul; 
    97100 int32_t  div; 
     101}; 
     102 
     103struct roardsp_dcblock { 
     104 int cur; 
     105 int32_t dc[ROARDSP_DCBLOCK_NUMBLOCKS]; 
    98106}; 
    99107 
     
    146154int roardsp_downmix_ctl    (struct roardsp_filter * filter, int cmd, void * data); 
    147155 
     156int roardsp_dcblock_init   (struct roardsp_filter * filter, struct roar_stream * stream, int id); 
     157int roardsp_dcblock_uninit (struct roardsp_filter * filter); 
     158int roardsp_dcblock_calc16 (struct roardsp_filter * filter, void * data, size_t samples); 
     159 
    148160// codecs: 
    149161int roardsp_conv_alaw2pcm16 (int16_t * out, char * in, size_t len); 
  • libroardsp/Makefile

    r1004 r1100  
    44OBJS=libroardsp.o filter.o filterchain.o alaw.o mulaw.o 
    55OLDROAR=midi.o 
    6 FILTER=lowp.o highp.o amp.o quantify.o add.o clip.o downmix.o 
     6FILTER=lowp.o highp.o amp.o quantify.o add.o clip.o downmix.o dcblock.o 
    77 
    88#DEFINES        = -DDEBUG 
  • libroardsp/filter.c

    r1004 r1100  
    4747 {ROARDSP_FILTER_DOWNMIX, "downmix", roardsp_downmix_init, NULL, roardsp_downmix_ctl, { 
    4848           {NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, roardsp_downmix_calc162},{NULL, NULL, NULL},{NULL, NULL, NULL}}}, 
     49 {ROARDSP_FILTER_DCBLOCK, "DCBlock", roardsp_dcblock_init, NULL, NULL, { 
     50           {NULL, NULL, NULL},{NULL, NULL, NULL},{roardsp_dcblock_calc16, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL}}}, 
    4951 {-1, NULL, NULL, NULL, NULL, { 
    5052      // ?                  8Bit               16Bit              24Bit              32Bit 
Note: See TracChangeset for help on using the changeset viewer.