Synopsis:
SMsetrecparm(vox_chan,parmID,value);
Arguments:
vox_chan - The voice channel
parmID - The parameter ID to set
value – The parameter value
Description: This function allows for certain recording parameters to be set for a particular channel. Each channel has it's own copy of a SM_RECORD_PARMS structure which is passed to the Aculab sm_record_start() function and these parameters can be set prior to a call to SMrecord() by using this function.
The list of record parameters that can be set is as follows:
|
ParmID |
Maps to field: |
|
SM_RECPARM_AGC |
SM_RECORD_PARMS.agc |
|
SM_RECPARM_VOLUME |
SM_RECORD_PARMS.volume |
|
SM_RECPARM_SILENC_ELIM |
SM_RECORD_PARMS.silence_elimination |
|
SM_RECPARM_TONE_ELIM_MODE |
SM_RECORD_PARMS.tone_elimination_mode |
|
SM_RECPARM_TONE_ELIM_SET |
SM_RECORD_PARMS.tone_elimination_set_id |
|
SM_RECPARM_ALTDATASOURCE |
SM_RECORD_PARMS.alt_data_source |
|
SM_RECPARM_ALTDATASOURCE_TYPE |
SM_RECORD_PARMS.alt_data_source_type |
The values for the parmIDs are defined in the ACULAB.INC file are are shown below:
const SM_RECPARM_AGC =1;
const SM_RECPARM_VOLUME =2;
const SM_RECPARM_SILENC_ELIM =3;
const SM_RECPARM_TONE_ELIM_MODE =4;
const SM_RECPARM_TONE_ELIM_SET =5;
const SM_RECPARM_ALTDATASOURCE =6;
const SM_RECPARM_ALTDATASOURCE_TYPE =7;
Below is a description of these parameters:
SM_RECPARM_AGC – This is an Indicator of whether automatic gain control is to be enabled. Set to a non zero value to enable or zero to enable.
SM_RECPARM_VOLUME – Set this to the desired adjustment to the volume (dB). The range of gain supported is at least +8 to -22 dB
SM_RECPARM_SILENC_ELIM - The maximum duration (in mS) of silence to record. Silences longer than this are truncated to this length. The value zero disables silence elimination.
SM_RECPARM_TONE_ELIM_MODE – Indicaties what types of tones to eliminate from the recording. and can be one of these values (as defined in the ACULAB.INC file):
SMToneDetectionNone - Simple tones never recognised.
SMToneDetectionNoMinDuration - mple tone detection enabled, no minimum period. If the correct frequencies are detected with the correct signal to noise ratio, twist, etc. for however short a duration, the tone is considered to be present and is recognised.
kMToneDetectionMinDuration64 - Simple tone detection enabled, tone must be valid for minimum period to be detected. If the tone is valid for 64mS it will definitely be detected. Tones of shorter duration between 32mS and 64mS may be detected but cannot be guaranteed.
SMToneDetectionMinDuration40 - This mode uses a slightly more complex algorithm for analysing duration of a valid tone, and enables robust detection of tones with duration as short as 40mS.
SMToneEndDetectionNoMinDuration - This mode is like SMToneDetectionNoMinDuration but application notified when end of tone detected.
SMToneEndDetectionMinDuration64 - This mode is like SMToneDetectionMinDuration64 but application notified when end of tone detected.
SMToneEndDetectionMinDuration40 - This mode is like SMToneDetectionMinDuration40 but application notified when end of tone detected.
SMToneLenDetectionNoMinDuration - This mode is like SMToneEndDetectionNoMinDuration but returns additional tone duration information to application.
SMToneLenDetectionMinDuration64 - This mode is like SMToneEndDetectionMinDuration64 but returns additional tone duration information to application.
SMToneLenDetectionMinDuration40 - This mode is like SMToneEndDetectionMinDuration40 but returns additional tone duration information to application.
SMToneDetectionAsListenFor - This mode is only valid when a tone detection mode is currently active on the same channel, started by SMctlDtmf(). Any tones detected on the same channel as the recording will be eliminated from the recorded data.
SM_RECPARM_TONE_ELIM_SET – The tone set to use (NOT YET IMPLEMENTED)
SM_RECPARM_ALTDATASOURCE – An alternative voice channel whose input or output is to be record (set to 0 if no alternative voice channel is specified)
SM_RECPARM_ALTDATASOURCE_TYPE - If an SM_RECPARM_ALTDATASOURCE channel is specified, this defines which kind of data associated with that channel should be recorded. One of these values:
SMRecordAltSourceDefault – If the channel specified for SM_RECPARM_ALTDATASOURCE is an input only channel, then data switched to this channel input will be recorded, otherwise the data being generated on this channel output will be recorded (this feature is normally used to record conferenced outputs). SMRecordAltSourceInput - Data switched to the alternative data source input will be recorded
SMRecordAltSourceOutput - Data generated on the alternative data source output will be recorded.
Returns: 0 if successful or negative error code.