libjulius/src/callback.c File Reference

Regist and execute callback functions. More...

#include <julius/julius.h>

Go to the source code of this file.

Functions

void callback_init (Recog *recog)
 Initialize callback management area.
static int callback_add_core (Recog *recog, int code, void(*func)(), void *data)
 Core function to register a function to a callback registory.
int callback_add (Recog *recog, int code, void(*func)(Recog *recog, void *data), void *data)
 Register a function to a callback registory.
int callback_add_adin (Recog *recog, int code, void(*func)(Recog *recog, SP16 *buf, int len, void *data), void *data)
 Register a function to the A/D-in type callback registory.
void callback_exec (int code, Recog *recog)
 Execute all functions assigned to a callback registory.
void callback_exec_adin (int code, Recog *recog, SP16 *buf, int len)
 Execute all functions assigned to a A/D-in callback.
boolean callback_exist (Recog *recog, int code)
 Check if at least one function has been registered to a callback repository.
boolean callback_delete (Recog *recog, int id)
 Delete an already registered function from callback.


Detailed Description

Regist and execute callback functions.

This file contains functions for handling callback functions. User should use callback_add() (and callback_add_adin() for A/D-in related callbacks) to regist user function to the callback repository. Then, Julius will call the registered functions at apropriate timimg while search.

More than one function can be assigned to a callback, in which case all functions will be called in turn.

Author:
Akinobu Lee
Date:
Fri Oct 26 00:03:18 2007
$Revision:$

Definition in file callback.c.


Function Documentation

void callback_init ( Recog recog  ) 

Initialize callback management area.

Parameters:
recog [i/o] engine instance

Definition at line 53 of file callback.c.

Referenced by j_recog_new().

Here is the caller graph for this function:

static int callback_add_core ( Recog recog,
int  code,
void(*)()  func,
void *  data 
) [static]

Core function to register a function to a callback registory.

Parameters:
recog [i/o] engine instance
code [in] code in which the function will be registered
func [in] function
data [in] user-specified argument to be passed when the function is called inside Julius
Returns:
global callback ID unique for the whole process, or -1 on error.

Definition at line 77 of file callback.c.

Referenced by callback_add(), and callback_add_adin().

void callback_exec ( int  code,
Recog recog 
)

Execute all functions assigned to a callback registory.

Parameters:
code [in] callback code
recog [in] engine instance.

Definition at line 183 of file callback.c.

Referenced by adin_cut(), callback_check_in_adin(), decode_proceed(), get_back_trellis(), gmm_end(), RealTimeParam(), RealTimePipeLine(), and RealTimeResume().

Here is the caller graph for this function:

void callback_exec_adin ( int  code,
Recog recog,
SP16 buf,
int  len 
)

Execute all functions assigned to a A/D-in callback.

Parameters:
code [in] callbcak code
recog [in] engine instance
buf [in] buffer that holds the current input speech which will be passed to the functions
len [in] length of buf

Definition at line 214 of file callback.c.

Referenced by adin_cut().

Here is the caller graph for this function:


Generated on Tue Dec 18 16:00:58 2007 for Julius by  doxygen 1.5.4