Пример #1
0
/*************************************************************************
*
*  Function:   Speech_Encode_Frame_exit
*  Purpose:    The memory used for state memory is freed
*
**************************************************************************
*/
void Speech_Encode_Frame_exit (Speech_Encode_FrameState **state)
{
  if (state == NULL || *state == NULL)
      return;
 
  Pre_Process_exit(&(*state)->pre_state);
  cod_amr_exit(&(*state)->cod_amr_state);

  setCounter((*state)->complexityCounter);
  WMOPS_output(0);
  setCounter(0); /* set counter to global counter */
 
  /* deallocate memory */
  free(*state);
  *state = NULL;
  
  return;
}
Пример #2
0
void GSMEncodeFrameExit(void **state_data)
{

    Speech_Encode_FrameState **state =
        (Speech_Encode_FrameState **) state_data;

    if (state == NULL || *state == NULL)
        return;

    Pre_Process_exit(&(*state)->pre_state);
    cod_amr_exit(&(*state)->cod_amr_state);

    /* deallocate memory */
    oscl_free(*state);
    *state = NULL;

    return;
}