Senc
Provides a simple interface to SPHENC (XDM 0.9) based algorithms. Currently only works for TI:s G711 encoder due to assumptions made. Typical example below (G.711, no error checking):.
More...
Detailed Description
Provides a simple interface to SPHENC (XDM 0.9) based algorithms. Currently only works for TI:s G711 encoder due to assumptions made. Typical example below (G.711, no error checking):.
Typedef Documentation
Handle through which to reference a Speech Encode algorithm.
Function Documentation
Senc_Handle Senc_create |
( |
Engine_Handle |
hEngine, |
|
|
Char * |
codecName, |
|
|
SPHENC_Params * |
params, |
|
|
SPHENC_DynamicParams * |
dynParams | |
|
) |
| | |
Creates a Speech Encode (XDM 0.9) algorithm instance.
- Parameters:
-
[in] | hEngine | An opened engine containing the algorithm to create. |
[in] | codecName | The name of the algorithm to open. Corresponds to the string name given in the .cfg file. |
[in] | params | XDM parameters to use while creating the codec. |
[in] | dynParams | XDM dynamic parameters to use while creating the codec. |
- Return values:
-
| Handle | for use in subsequent operations (see Senc_Handle). |
| NULL | for failure. |
Encodes a speech buffer.
- Parameters:
-
[in] | hSe | The Senc_Handle to use for encoding. |
[in] | hInBuf | The Buffer_Handle for the buffer containing the raw data. |
[in] | hOutBuf | The Buffer_Handle for the buffer to fill with encoded data. |
- Return values:
-
| Dmai_EOK | for success. |
| Negative value | for failure, see Dmai.h. |
Deletes a Speech Encode algorithm instance.
- Parameters:
-
- Return values:
-
| Dmai_EOK | for success. |
| Negative value | for failure, see Dmai.h. |
Get the SPHENC handle from the Senc module instance.
- Parameters:
-
[in] | hSe | The Senc_Handle for which to get the SPHENC handle. |
- Return values:
-
| Handle | to the speech encode algorithm, see the XDM documentation for SPHENC. |
Get the input buffer size required by the codec.
- Parameters:
-
[in] | hSe | The Senc_Handle for which to get the buffer size. |
- Return values:
-
| Size | in bytes of the input buffer required. |
Get the output buffer size required by the codec.
- Parameters:
-
[in] | hSe | The Senc_Handle for which to get the buffer size. |
- Return values:
-
| Size | in bytes of the output buffer required. |
Variable Documentation
Default XDM parameters for a Speech Encode algorithm.
size = sizeof(SPHENC_Params),
frameSize = 80,
compandingLaw = ISPEECH_ALAW,
packingType = 0,
vadSelection = 0
Default XDM dynamic parameters for a Speech Encode algorithm.
size = sizeof(ISPHENC_DynamicParams),
frameSize = 80,
bitRate = 0,
mode = 0,
vadFlag = 0,
noiseSuppressionMode = 0,
ttyTddMode = 0,
dtmfMode = 0,
dataTransmit = 1,
homingMode = 0