Home Units Hierarchy Routines All identifiers

Class unaSpeexDSP

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaSpeexDSP = class(unaObject)

Description

Speex DSP

Hierarchy

Overview

Methods

Public constructor create(const libName: wString = '');
Public destructor Destroy(); override;
Public function open(frameSize, samplingRate: int; aec: bool = false): int;
Public function preprocess(frame: pspx_int16_t): bool;
Public function resampleDst(srcFrame: pspx_int16_t; var srcSamples: spx_uint32_t; outBuf: pspx_int16_t; outSamplingRate: int; var outBufUsed: spx_uint32_t): uint;
Public function resampleSrc(srcFrame: pspx_int16_t; var srcSamples: spx_uint32_t; srcSamplingRate: int; outBuf: pspx_int16_t; var outBufUsed: spx_uint32_t): uint;
Protected function lock(timeout: tTimeout = 1000): bool;
Public procedure close();
Public procedure echo_capture(inFrame: pspx_int16_t; outFrame: pspx_int16_t);
Public procedure echo_playback(frame: pspx_int16_t);
Protected procedure unlock();

Properties

Public property active: bool read f_active;
Public property api: pSpeexDSPLibrary_proc read getLib;
Public property dsp_AGC: bool index 1 read dsp_getBool write dsp_setBool;
Public property dsp_AGC_level: float read getAcgLvl;
Public property dsp_AGC_loudness: float read getAcgLdn;
Public property dsp_denoise: bool index 0 read dsp_getBool write dsp_setBool;
Public property dsp_dereverb: bool index 3 read dsp_getBool write dsp_setBool;
Public property dsp_VAD: bool index 2 read dsp_getBool write dsp_setBool;
Public property error: int read f_error;
Public property frameSize: int read f_frameSize;
Public property lastFrameVAD: bool read f_lfv;
Public property libOK: bool read f_libOK;
Public property samplingRate: int read f_sps;

Description

Methods

Public constructor create(const libName: wString = '');

Creates Speex DSP instance.

Public destructor Destroy(); override;

Destroys Speex DSP instance.

Public function open(frameSize, samplingRate: int; aec: bool = false): int;

Open DSP instance.

Parameters
frameSize
size of one frame in samples
samplingRate
sampling rate
aec
enable AEC module
Returns

0 or errorCode

Public function preprocess(frame: pspx_int16_t): bool;

Preprocesses a frame.

Parameters
frame
audio samples (must be 16 bit/mono)
Returns

True for voice, false for silence/noise (only if VAD is enabled)

Public function resampleDst(srcFrame: pspx_int16_t; var srcSamples: spx_uint32_t; outBuf: pspx_int16_t; outSamplingRate: int; var outBufUsed: spx_uint32_t): uint;
 
Public function resampleSrc(srcFrame: pspx_int16_t; var srcSamples: spx_uint32_t; srcSamplingRate: int; outBuf: pspx_int16_t; var outBufUsed: spx_uint32_t): uint;

Resamples a frame.

Parameters
srcFrame
audio samples (must be 16 bit/mono) to be resampled
srcSamples
number of samples in srcFrame
srcSamplingRate
source sampling rate
outBuf
destination buffer
outBufUsed
number of samples written into outBuf
Returns

number of samples read from srcFrame

Protected function lock(timeout: tTimeout = 1000): bool;
 
Public procedure close();

Close DSP instance.

Public procedure echo_capture(inFrame: pspx_int16_t; outFrame: pspx_int16_t);
 
Public procedure echo_playback(frame: pspx_int16_t);
 
Protected procedure unlock();
 

Properties

Public property active: bool read f_active;
 
Public property api: pSpeexDSPLibrary_proc read getLib;

Speex proc.

Public property dsp_AGC: bool index 1 read dsp_getBool write dsp_setBool;

SPEEX_PREPROCESS_GET_AGC/SPEEX_PREPROCESS_SET_AGC

Public property dsp_AGC_level: float read getAcgLvl;

SPEEX_PREPROCESS_GET_AGC_LEVEL/SPEEX_PREPROCESS_SET_AGC_LEVEL

Public property dsp_AGC_loudness: float read getAcgLdn;

SPEEX_PREPROCESS_GET_AGC_LOUDNESS /SPEEX_PREPROCESS_SET_AGC_LOUDNESS

Public property dsp_denoise: bool index 0 read dsp_getBool write dsp_setBool;

SPEEX_PREPROCESS_GET_DENOISE/SPEEX_PREPROCESS_GET_DENOISE

Public property dsp_dereverb: bool index 3 read dsp_getBool write dsp_setBool;

SPEEX_PREPROCESS_GET_VAD/SPEEX_PREPROCESS_SET_VAD

Public property dsp_VAD: bool index 2 read dsp_getBool write dsp_setBool;

SPEEX_PREPROCESS_GET_VAD/SPEEX_PREPROCESS_SET_VAD

Public property error: int read f_error;

Last error.

Public property frameSize: int read f_frameSize;

Frame size (in samples) the DSP was initialized with

Public property lastFrameVAD: bool read f_lfv;

True for voice, false for silence/noise (only if VAD is enabled).

Public property libOK: bool read f_libOK;
 
Public property samplingRate: int read f_sps;

Sampling rate the DSP was initialized with

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09