Changeset 2992:ff4cbda31297 in roaraudio


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

start with Speex Prep filter

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile.inc

    r2386 r2992  
    66 
    77# libroardsp: 
    8 DSP_CODECLIBS   = $(lib_celt) $(lib_speex) 
     8DSP_CODECLIBS   = $(lib_celt) $(lib_speex) $(lib_speexdsp) 
    99DSP_AUXLIBS     = $(lib_samplerate) 
    1010LIBROARDSP_NS   = $(DSP_CODECLIBS) $(DSP_AUXLIBS) $(LIBROAR) $(lib_m) 
  • include/libroardsp/libroardsp.h

    r2989 r2992  
    2929 
    3030__BEGIN_DECLS 
     31 
     32// enable Speex preprocessing and better type handling if speex > 1.1.8 
     33#ifdef ROAR_HAVE_LIBSPEEX 
     34#include <speex/speex.h> 
     35#ifdef _SPEEX_TYPES_H 
     36#include <speex/speex_preprocess.h> 
     37#endif 
     38#endif 
    3139 
    3240#include "midi.h" 
     
    7482// filter CTLs: 
    7583 
    76 #define ROARDSP_FCTL_FREQ             1 
     84#define ROARDSP_FCTL_FREQ             1 /* float */ 
    7785#define ROARDSP_FCTL_TIME             2 
    7886#define ROARDSP_FCTL_MUL              3 
     
    8391#define ROARDSP_FCTL_Q                8 
    8492#define ROARDSP_FCTL_MODE             9 
    85 #define ROARDSP_FCTL_PACKET_SIZE     10 
     93#define ROARDSP_FCTL_PACKET_SIZE     10 /* size_t */ 
    8694 
    8795// consts for filter flags: 
     
    155163 
    156164struct roardsp_speex_prep { 
     165#ifdef _SPEEX_TYPES_H 
     166 SpeexPreprocessState *preprocess; 
     167 int frame_size; 
     168#else 
    157169 char dummy[8]; 
     170#endif 
    158171}; 
    159172 
     
    229242int roardsp_swap_reset  (struct roardsp_filter * filter, int what); 
    230243 
     244#ifdef _SPEEX_TYPES_H 
     245int roardsp_speex_prep_init   (struct roardsp_filter * filter, struct roar_stream * stream, int id); 
     246int roardsp_speex_prep_uninit (struct roardsp_filter * filter); 
     247int roardsp_speex_prep_ctl    (struct roardsp_filter * filter, int cmd, void * data); 
     248int roardsp_speex_prep_reset  (struct roardsp_filter * filter, int what); 
     249#endif 
     250 
    231251// codecs: 
    232252int roardsp_conv_alaw2pcm16 (int16_t * out, char * in, size_t len); 
  • libroardsp/Makefile

    r2935 r2992  
    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 
    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 
     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_speex_prep.o 
    1010MIDI=synth.o 
    1111CODECS=alaw.o mulaw.o 
  • libroardsp/filter.c

    r2990 r2992  
    5454 {ROARDSP_FILTER_SWAP, "Swap", roardsp_swap_init, roardsp_swap_uninit, roardsp_swap_ctl, roardsp_swap_reset, { 
    5555           {NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, roardsp_swap_calc162, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL}}}, 
     56 {ROARDSP_FILTER_SPEEX_PREP, "SpeexPrep", roardsp_speex_prep_init, roardsp_speex_prep_uninit, 
     57                                          roardsp_speex_prep_ctl,  roardsp_speex_prep_reset, { 
     58           {NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL},{NULL, NULL, NULL}}}, 
    5659 {-1, NULL, NULL, NULL, NULL, NULL, { 
    5760      // ?                  8Bit               16Bit              24Bit              32Bit 
Note: See TracChangeset for help on using the changeset viewer.