- Timestamp:
- Nov 23, 2006 10:19:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/speex/speex_echo.h
r628 r823 34 34 #ifndef SPEEX_ECHO_H 35 35 #define SPEEX_ECHO_H 36 36 /** @defgroup SpeexEchoState SpeexEchoState: Acoustic echo canceller 37 * This is the acoustic echo canceller module. 38 * @{ 39 */ 37 40 #include "speex/speex_types.h" 38 41 … … 49 52 #define SPEEX_ECHO_GET_SAMPLING_RATE 25 50 53 51 52 /*struct drft_lookup;*/ 54 /** Internal echo canceller state. Should never be accessed directly. */ 53 55 struct SpeexEchoState_; 54 56 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. */ 55 62 typedef struct SpeexEchoState_ SpeexEchoState; 56 63 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 */ 58 69 SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length); 59 70 60 /** Destroys an echo canceller state */ 71 /** Destroys an echo canceller state 72 * @param st Echo canceller state 73 */ 61 74 void speex_echo_state_destroy(SpeexEchoState *st); 62 75 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 */ 84 void 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) */ 64 87 void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout); 65 88 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 */ 95 void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out); 68 96 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 */ 70 101 void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play); 71 102 72 /** Reset the echo canceller state */ 103 /** Reset the echo canceller to its original state 104 * @param st Echo canceller state 105 */ 73 106 void speex_echo_state_reset(SpeexEchoState *st); 74 107 75 108 /** Used like the ioctl function to control the echo canceller parameters 76 109 * 77 * @param st ate Encoder state110 * @param st Echo canceller state 78 111 * @param request ioctl-type request (one of the SPEEX_ECHO_* macros) 79 112 * @param ptr Data exchanged to-from function … … 86 119 #endif 87 120 121 122 /** @}*/ 88 123 #endif
Note: See TracChangeset
for help on using the changeset viewer.