Prosody signal path processing: API: sm_path_emphasis

Prototype Definition

int sm_path_emphasis(struct sm_path_emphasis_parms *emphparms)

Parameters

*emphparms
a structure of the following type:
typedef struct sm_path_emphasis_parms {
	tSMPathId path;						/* in */
	tSM_INT enable;						/* in */
	enum kSMPathEmphMode {
		kSMPathEmphModeHFEmphasis,
		kSMPathEmphModeHFDeemphasis,
	} mode;							/* in */
	tSM_INT gain;						/* in */
} SM_PATH_EMPHASIS_PARMS;

Description

Configures a high-frequency emphasis/de-emphasis filter. In emphasis mode, response curve is approximately -3dB at 0Hz rising to 0dB at 300Hz and 20dB at 3330Hz. In de-emphasis mode, the inverse filter is applied: 3dB at 0Hz falling to 0dB at 300Hz and -20dB at 3330Hz. Disabling the filter also disables the gain. Note that the frequencies quoted are proportional to the input signal sample rate and those given are for an input signal sample rate of 8000 samples per second.

Requires the module emph to be loaded.

Fields

path
The signal path to be configured
enable
Enables (non-zero) or disables (zero) filter.
mode
Indicates what mode the filter operates in. One of these values:
kSMPathEmphModeHFEmphasis
Puts the filter into HF emphasis mode.
kSMPathEmphModeHFDeemphasis
Puts the filter into HF de-emphasis mode.
gain
Extra gain to apply to the signal as part of the filter, in dB.

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody signal path processing API.