Class SpeexDSPEchoCanceler
Speexdsp echo cancellation.
Inherited Members
Namespace: SpeexDSPSharp.Core
Assembly: SpeexDSPSharp.Core.dll
Syntax
public class SpeexDSPEchoCancelerConstructors
| Edit this page View SourceSpeexDSPEchoCanceler(int, int)
Creates a new speexdsp echo canceler.
Declaration
public SpeexDSPEchoCanceler(int frame_size, int filter_length)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). | 
SpeexDSPEchoCanceler(int, int, int, int)
Creates a new multi-channel speexdsp echo canceler.
Declaration
public SpeexDSPEchoCanceler(int frame_size, int filter_length, int nb_mic, int nb_speaker)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. | 
Fields
| Edit this page View Source_handler
Direct safe handle for the SpeexDSPEchoCanceler. IT IS NOT RECOMMENDED TO CLOSE THE HANDLE DIRECTLY! Instead use Dispose(bool) to dispose the handle and object safely.
Declaration
protected readonly SpeexDSPEchoStateSafeHandler _handlerField Value
| Type | Description | 
|---|---|
| SpeexDSPEchoStateSafeHandler | 
Methods
| Edit this page View SourceCheckError(int)
Checks if there is an opus error and throws if the error is a negative value.
Declaration
protected static void CheckError(int error)Parameters
| Type | Name | Description | 
|---|---|---|
| int | error | The error code to input. | 
Exceptions
| Type | Condition | 
|---|---|
| SpeexDSPException | 
Ctl<T>(EchoCancellationCtl, ref T)
Performs a ctl request.
Declaration
public int Ctl<T>(EchoCancellationCtl request, ref T value) where T : unmanagedParameters
| 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()Dispose(bool)
Dispose logic.
Declaration
protected virtual void Dispose(bool disposing)Parameters
| Type | Name | Description | 
|---|---|---|
| bool | disposing | Set to true if fully disposing. | 
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. | 
EchoCancel(Span<byte>, Span<byte>, Span<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(Span<byte> rec, Span<byte> play, Span<byte> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<byte> | rec | Signal from the microphone (near end + far end echo). | 
| Span<byte> | play | Signal played to the speaker (received from far end). | 
| Span<byte> | output | Returns near-end signal with echo removed. | 
EchoCancel(Span<short>, Span<short>, Span<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(Span<short> rec, Span<short> play, Span<short> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<short> | rec | Signal from the microphone (near end + far end echo). | 
| Span<short> | play | Signal played to the speaker (received from far end). | 
| Span<short> | output | Returns near-end signal with echo removed. | 
EchoCancel(Span<float>, Span<float>, Span<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(Span<float> rec, Span<float> play, Span<float> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<float> | rec | Signal from the microphone (near end + far end echo). | 
| Span<float> | play | Signal played to the speaker (received from far end). | 
| Span<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. | 
EchoCapture(Span<byte>, Span<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(Span<byte> rec, Span<byte> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<byte> | rec | Signal from the microphone (near end + far end echo). | 
| Span<byte> | output | Returns near-end signal with echo removed. | 
EchoCapture(Span<short>, Span<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(Span<short> rec, Span<short> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<short> | rec | Signal from the microphone (near end + far end echo). | 
| Span<short> | output | Returns near-end signal with echo removed. | 
EchoCapture(Span<float>, Span<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(Span<float> rec, Span<float> output)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<float> | rec | Signal from the microphone (near end + far end echo). | 
| Span<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). | 
EchoPlayback(Span<byte>)
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(Span<byte> play)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<byte> | play | Signal played to the speaker (received from far end). | 
EchoPlayback(Span<short>)
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(Span<short> play)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<short> | play | Signal played to the speaker (received from far end). | 
EchoPlayback(Span<float>)
Let the echo canceler know that a frame was just queued to the sound card.
Declaration
public void EchoPlayback(Span<float> play)Parameters
| Type | Name | Description | 
|---|---|---|
| Span<float> | play | Signal played to the speaker (received from far end). | 
~SpeexDSPEchoCanceler()
Speexdsp echo canceler destructor.
Declaration
protected ~SpeexDSPEchoCanceler()Reset()
Reset the echo canceler to its original state.
Declaration
public void Reset()ThrowIfDisposed()
Throws an exception if this object is disposed or the handler is closed.
Declaration
protected virtual void ThrowIfDisposed()Exceptions
| Type | Condition | 
|---|---|
| ObjectDisposedException |