www.pudn.com > g7231codec.rar > _GI23DE.c
/*
//============================================================================
//
// FILE NAME : _GI23DE.c
//
// BLOCK NAME: G723DE
//
// GROUP NAME: Default Group
//
// PURPOSE : Provides the real-time block's DSP C source code.
//
// Component Wizard for eXpressDSP Version 1.31.00 Auto-Generated Block
//
// Number of Inputs : 1
// Number of Outputs: 1
//
// Creation Date: Mon - 16 May 2005
// Creation Time: 04:34 PM
//
//============================================================================
*/
#include "_gi23de.h"
#pragma DATA_SECTION(Params, ".hyper:ignore")
PARAMS Params;
/*----------------------------------------------------------------------------*/
/* Optional real-time block interrupt routine */
/*----------------------------------------------------------------------------*/
/* If this routine is activated, it will be called in response to a selected */
/* DSP interrupt. If this routine in not activated, the main block routine */
/* will be called in response to a selected DSP interrupt. */
/*----------------------------------------------------------------------------*/
/*
void GI23DE_INT(PARAMS *pPtr)
{
}
*/
/*----------------------------------------------------------------------------*/
/* Optional real-time block initialization routine */
/*----------------------------------------------------------------------------*/
/* If this routine is activated, it will be called one time before the main */
/* application begins. This allows for any required software or hardware */
/* initialization to be performed before the block executes. */
/*----------------------------------------------------------------------------*/
static IG723DE_Fxns fxns;
static G723DE_Params params;
void GI23DE_INIT(PARAMS *pPtr)
{
fxns = G723DE_KN_IG723DE;
params = G723DE_PARAMS;
params.framesizeIn0 = pPtr->FramesizeIn0;
params.framesizeOut0 = pPtr->FramesizeOut0;
params.annexA = pPtr->_annexA;
params.pfoEnable = pPtr->_pfoEnable;
pPtr->handle = G723DE_create(&fxns, ¶ms);
}
/*----------------------------------------------------------------------------*/
/* Optional real-time block stop routine */
/*----------------------------------------------------------------------------*/
/* If this routine is activated, it will be called whenever the block diagram */
/* worksheet's execution is stopped. Blocks that deal with hardware may need */
/* this routine to stop the hardware's execution. */
/*----------------------------------------------------------------------------*/
/*
void GI23DE_STOP(PARAMS *pPtr)
{
}
*/
/*----------------------------------------------------------------------------*/
/* Optional real-time block restart routine */
/*----------------------------------------------------------------------------*/
/* If this routine is activated, it will be called whenever a block diagram */
/* worksheet is executed after being stopped. Blocks that deal with hardware */
/* may need this routine to restart the hardware's execution. */
/*----------------------------------------------------------------------------*/
/*
void GI23DE_RESTART(PARAMS *pPtr)
{
}
*/
/*----------------------------------------------------------------------------*/
/* Real-time block routine */
/*----------------------------------------------------------------------------*/
/* This is the main block routine. It is called during each loop of the main */
/* application. If an interrupt is selected, and the interrupt routine above */
/* is not activated, this routine will be called in response to the selected */
/* interrupt instead of during the main application loop. */
/* Custom fields of the pPtr structure may be accessed as follows: */
/* pPtr->FramesizeIn0 = ...; */
/* pPtr->FramesizeOut0 = ...; */
/* pPtr->_annexA = ...; */
/* pPtr->_pfoEnable = ...; */
/*----------------------------------------------------------------------------*/
void GI23DE(PARAMS *pPtr)
{
if(pPtr->handle){
if(pPtr->Changed){
G723DE_Status status;
pPtr->Changed = FALSE;
status.annexA = pPtr->_annexA;
status.pfoEnable = pPtr->_pfoEnable;
G723DE_control(pPtr->handle, G723DE_SETSTATUS, &status);
}
/* Call XDAIS algorithm specific routine(s) */
/* For example: */
G723DE_apply(pPtr->handle, (XDAS_Int16 *)pPtr->PtrIn0, (XDAS_Int16 *)pPtr->PtrOut0);
}
}