Class SpeexDSPEchoCanceler
A Speexdsp echo canceller.
Inherited Members
Namespace: SpeexDSPSharp.Core
Assembly: SpeexDSPSharp.Core.dll
Syntax
public class SpeexDSPEchoCanceler : ISpeexDSPEchoCanceler, IDisposable
Constructors
| Edit this page View SourceSpeexDSPEchoCanceler(int, int, int, int, bool)
Creates a new multi-channel speexdsp echo canceler.
Declaration
public SpeexDSPEchoCanceler(int frame_size, int filter_length, int nb_mic, int nb_speaker, bool use_static)
Parameters
| Type | Name | Description |
|---|---|---|
| int | frame_size | Number of samples to process at one time (should correspond to 10-20 ms). |
| int | filter_length | Number of samples of echo to cancel (should generally correspond to 100-500 ms). |
| int | nb_mic | Number of microphone channels. |
| int | nb_speaker | Number of speaker channels. |
| bool | use_static | Set to true to force static imports, false to force dynamic imports, or null to auto-select based on platform. |
SpeexDSPEchoCanceler(int, int, bool?)
Creates a new speexdsp echo canceler.
Declaration
public SpeexDSPEchoCanceler(int frame_size, int filter_length, bool? use_static = null)
Parameters
| Type | Name | Description |
|---|---|---|
| int | frame_size | Number of samples to process at one time (should correspond to 10-20 ms). |
| int | filter_length | Number of samples of echo to cancel (should generally correspond to 100-500 ms). |
| bool? | use_static | Set to true to force static imports, false to force dynamic imports, or null to auto-select based on platform. |
Fields
| Edit this page View Source_echoCanceler
Direct echo canceler for SpeexDSPEchoCanceler. You can close this directly.
Declaration
protected ISpeexDSPEchoCanceler _echoCanceler
Field Value
| Type | Description |
|---|---|
| ISpeexDSPEchoCanceler |
Methods
| Edit this page View SourceCtl<T>(EchoCancellationCtl, ref T)
Performs a ctl request.
Declaration
public int Ctl<T>(EchoCancellationCtl request, ref T value) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| EchoCancellationCtl | request | The request you want to specify. |
| T | value | The input/output value. |
Returns
| Type | Description |
|---|---|
| int | 0 if no error, -1 if request is unknown. |
Type Parameters
| Name | Description |
|---|---|
| T | The type you want to input/output. |
Dispose()
Declaration
public void Dispose()
EchoCancel(byte[], byte[], byte[])
Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added to playback in this form).
Declaration
public void EchoCancel(byte[] rec, byte[] play, byte[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | rec | Signal from the microphone (near end + far end echo). |
| byte[] | play | Signal played to the speaker (received from far end). |
| byte[] | output | Returns near-end signal with echo removed. |
EchoCancel(short[], short[], short[])
Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added to playback in this form).
Declaration
public void EchoCancel(short[] rec, short[] play, short[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | rec | Signal from the microphone (near end + far end echo). |
| short[] | play | Signal played to the speaker (received from far end). |
| short[] | output | Returns near-end signal with echo removed. |
EchoCancel(float[], float[], float[])
Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added to playback in this form).
Declaration
public void EchoCancel(float[] rec, float[] play, float[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | rec | Signal from the microphone (near end + far end echo). |
| float[] | play | Signal played to the speaker (received from far end). |
| float[] | output | Returns near-end signal with echo removed. |
EchoCapture(byte[], byte[])
Perform echo cancellation using internal playback buffer, which is delayed by two frames to account for the delay introduced by most sound cards (but it could be off!).
Declaration
public void EchoCapture(byte[] rec, byte[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | rec | Signal from the microphone (near end + far end echo). |
| byte[] | output | Returns near-end signal with echo removed. |
EchoCapture(short[], short[])
Perform echo cancellation using internal playback buffer, which is delayed by two frames to account for the delay introduced by most sound cards (but it could be off!).
Declaration
public void EchoCapture(short[] rec, short[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | rec | Signal from the microphone (near end + far end echo). |
| short[] | output | Returns near-end signal with echo removed. |
EchoCapture(float[], float[])
Perform echo cancellation using internal playback buffer, which is delayed by two frames to account for the delay introduced by most sound cards (but it could be off!).
Declaration
public void EchoCapture(float[] rec, float[] output)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | rec | Signal from the microphone (near end + far end echo). |
| float[] | output | Returns near-end signal with echo removed. |
EchoPlayback(byte[])
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(byte[] play)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | play | Signal played to the speaker (received from far end). |
EchoPlayback(short[])
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(short[] play)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | play | Signal played to the speaker (received from far end). |
EchoPlayback(float[])
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(float[] play)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | play | Signal played to the speaker (received from far end). |
Reset()
Reset the echo canceler to its original state.
Declaration
public void Reset()