![]() |
![]() |
Typedefs | |
typedef struct Sdec1_Object * | Sdec1_Handle |
Handle through which to reference a Speech Decode algorithm. | |
Functions | |
Sdec1_Handle | Sdec1_create (Engine_Handle hEngine, Char *codecName, SPHDEC1_Params *params, SPHDEC1_DynamicParams *dynParams) |
Creates a Speech Decode (XDM 1.0) algorithm instance. | |
Int | Sdec1_process (Sdec1_Handle hSd, Buffer_Handle hInBuf, Buffer_Handle hOutBuf) |
Decodes a Speech buffer. | |
Int | Sdec1_delete (Sdec1_Handle hSd) |
Deletes a Speech Decode algorithm instance. | |
SPHDEC1_Handle | Sdec1_getVisaHandle (Sdec1_Handle hSd) |
Get the SPHDEC1 handle from the Sdec1 module instance. | |
Int32 | Sdec1_getInBufSize (Sdec1_Handle hSd) |
Get the input buffer size required by the codec. | |
Int32 | Sdec1_getOutBufSize (Sdec1_Handle hSd) |
Get the output buffer size required by the codec. | |
Variables | |
const SPHDEC1_Params | Sdec1_Params_DEFAULT |
Default XDM parameters for a Speech Decode algorithm. | |
const SPHDEC1_DynamicParams | Sdec1_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Speech Decode algorithm. |
Release Support: G711, G726, G729 and ILBC. Due to defect in ILBC Decoder v 1.10.002, this release will not work with this version.
Typical usage:
#include <xdc/std.h> #include <ti/sdo/ce/Engine.h> #include <ti/sdo/ce/CERuntime.h> #include <ti/sdo/dmai/Dmai.h> #include <ti/sdo/dmai/Buffer.h> #include <ti/sdo/dmai/Loader.h> #include <ti/sdo/dmai/ce/Sdec1.h> Sdec1_Handle hSd; Loader_Handle hLoader; Buffer_Handle hOutBuf, hInBuf; Engine_Handle hEngine; SPHDEC1_Params params = Sdec1_Params_DEFAULT; SPHDEC1_DynamicParams dynParams = Sdec1_DynamicParams_DEFAULT; Loader_Attrs lAttrs = Loader_Attrs_DEFAULT; Buffer_Attrs bAttrs = Buffer_Attrs_DEFAULT; CERuntime_init(); Dmai_init(); hEngine = Engine_open("myengine", NULL, NULL); hSd = Sdec1_create(hEngine, "mydec", ¶ms, &dynParams); hOutBuf = Buffer_create(Sdec1_getOutBufSize(hSd), &bAttrs); lAttrs.readSize = Sdec1_getInBufSize(hSd); lAttrs.readBufSize = lAttrs.readSize * 2; hLoader = Loader_create("myfile", &lAttrs); Loader_prime(hLoader, &hInBuf); while (1) { Sdec1_process(hSd, hInBuf, hOutBuf); // Raw decoded samples now available in hOutBuf. Loader_getFrame(hLoader, hInBuf); if (Buffer_getUserPtr(hInBuf) == NULL) break; } Loader_delete(hLoader); Buffer_delete(hOutBuf); Sdec1_delete(hSd); Engine_close(hEngine);
typedef struct Sdec1_Object* Sdec1_Handle |
Handle through which to reference a Speech Decode algorithm.
Sdec1_Handle Sdec1_create | ( | Engine_Handle | hEngine, | |
Char * | codecName, | |||
SPHDEC1_Params * | params, | |||
SPHDEC1_DynamicParams * | dynParams | |||
) |
Creates a Speech Decode (XDM 1.0) algorithm instance.
[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. |
Handle | for use in subsequent operations (see Sdec1_Handle). | |
NULL | for failure. |
Int Sdec1_process | ( | Sdec1_Handle | hSd, | |
Buffer_Handle | hInBuf, | |||
Buffer_Handle | hOutBuf | |||
) |
Decodes a Speech buffer.
[in] | hSd | The Sdec1_Handle to use for decoding. |
[in] | hInBuf | The Buffer_Handle for the buffer containing the encoded data. |
[in] | hOutBuf | The Buffer_Handle for the buffer to fill with decoded data. |
DMAI_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
Int Sdec1_delete | ( | Sdec1_Handle | hSd | ) |
Deletes a Speech Decode algorithm instance.
[in] | hSd | The Sdec1_Handle to delete. |
DMAI_EOK | for success. | |
Negative value | for failure, see Dmai.h. |
SPHDEC1_Handle Sdec1_getVisaHandle | ( | Sdec1_Handle | hSd | ) |
Get the SPHDEC1 handle from the Sdec1 module instance.
[in] | hSd | The Sdec1_Handle for which to get the SPHDEC1 handle. |
Handle | to the speech1 decode algorithm, see the XDM documentation for SPHDEC1. |
Int32 Sdec1_getInBufSize | ( | Sdec1_Handle | hSd | ) |
Get the input buffer size required by the codec.
[in] | hSd | The Sdec1_Handle for which to get the buffer size. |
Size | in bytes of the input buffer required. |
Int32 Sdec1_getOutBufSize | ( | Sdec1_Handle | hSd | ) |
Get the output buffer size required by the codec.
[in] | hSd | The Sdec1_Handle for which to get the buffer size. |
Size | in bytes of the output buffer required. |
const SPHDEC1_Params Sdec1_Params_DEFAULT |
Default XDM parameters for a Speech Decode algorithm.
size = sizeof(SPHDEC1_Params),
compandingLaw = ISPEECH1_PCM_COMPAND_ALAW,
packingType = 0,
codecSelection = 0,
bitRate = 0,
reserved = 0,
**tablesPtr = NULL,
const SPHDEC1_DynamicParams Sdec1_DynamicParams_DEFAULT |
Default XDM dynamic parameters for a Speech Decode algorithm.
size = sizeof(SPHDEC1_DynamicParams),
postFilter = 0