Ignore:
Timestamp:
Nov 23, 2006 10:19:46 AM (17 years ago)
Author:
bennylp
Message:

Updated Speex to their latest SVN (1.2-beta). AEC seems
to work much better now and take less CPU, so I increased
default tail length in PJSUA to 800ms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex/speex_echo.h

    r628 r823  
    3434#ifndef SPEEX_ECHO_H 
    3535#define SPEEX_ECHO_H 
    36  
     36/** @defgroup SpeexEchoState SpeexEchoState: Acoustic echo canceller 
     37 *  This is the acoustic echo canceller module. 
     38 *  @{ 
     39 */ 
    3740#include "speex/speex_types.h" 
    3841 
     
    4952#define SPEEX_ECHO_GET_SAMPLING_RATE 25 
    5053 
    51  
    52 /*struct drft_lookup;*/ 
     54/** Internal echo canceller state. Should never be accessed directly. */ 
    5355struct SpeexEchoState_; 
    5456 
     57/** @class SpeexEchoState 
     58 * This holds the state of the echo canceller. You need one per channel.  
     59*/ 
     60 
     61/** Internal echo canceller state. Should never be accessed directly. */ 
    5562typedef struct SpeexEchoState_ SpeexEchoState; 
    5663 
    57 /** Creates a new echo canceller state */ 
     64/** Creates a new echo canceller state 
     65 * @param frame_size Number of samples to process at one time (should correspond to 10-20 ms) 
     66 * @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms) 
     67 * @return Newly-created echo canceller state 
     68 */ 
    5869SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length); 
    5970 
    60 /** Destroys an echo canceller state */ 
     71/** Destroys an echo canceller state  
     72 * @param st Echo canceller state 
     73*/ 
    6174void speex_echo_state_destroy(SpeexEchoState *st); 
    6275 
    63 /** Performs echo cancellation a frame */ 
     76/** Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added 
     77 * to playback ni this form) 
     78 * 
     79 * @param st Echo canceller state 
     80 * @param rec signal from the microphone (near end + far end echo) 
     81 * @param play Signal played to the speaker (received from far end) 
     82 * @param out Returns near-end signal with echo removed 
     83 */ 
     84void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out); 
     85 
     86/** Performs echo cancellation a frame (deprecated) */ 
    6487void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout); 
    6588 
    66 /** Perform echo cancellation using internal playback buffer */ 
    67 void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out, spx_int32_t *Yout); 
     89/** Perform echo cancellation using internal playback buffer, which is delayed by two frames 
     90 * to account for the delay introduced by most soundcards (but it could be off!) 
     91 * @param st Echo canceller state 
     92 * @param rec signal from the microphone (near end + far end echo) 
     93 * @param out Returns near-end signal with echo removed 
     94*/ 
     95void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out); 
    6896 
    69 /** Let the echo canceller know that a frame was just played */ 
     97/** Let the echo canceller know that a frame was just queued to the soundcard 
     98 * @param st Echo canceller state 
     99 * @param play Signal played to the speaker (received from far end) 
     100*/ 
    70101void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play); 
    71102 
    72 /** Reset the echo canceller state */ 
     103/** Reset the echo canceller to its original state  
     104 * @param st Echo canceller state 
     105 */ 
    73106void speex_echo_state_reset(SpeexEchoState *st); 
    74107 
    75108/** Used like the ioctl function to control the echo canceller parameters 
    76109 * 
    77  * @param state Encoder state 
     110 * @param st Echo canceller state 
    78111 * @param request ioctl-type request (one of the SPEEX_ECHO_* macros) 
    79112 * @param ptr Data exchanged to-from function 
     
    86119#endif 
    87120 
     121 
     122/** @}*/ 
    88123#endif 
Note: See TracChangeset for help on using the changeset viewer.