The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHAIOAsterisk.cpp File Reference

Classes

class  io_asterisk_parser_t
 The parser interface of the IOAsterisk library. More...
 
class  io_asterisk_sound_t
 Sound data handling of io tcp library. More...
 
class  io_asterisk_fwcb_t
 TCP sound-io library's interface to the framework callbacks. More...
 
class  io_asterisk_t
 The tcp sound io library. More...
 

Macros

#define ERR_SUCCESS   0
 
#define ERR_IHANDLE   -1
 
#define ERR_USER   -1000
 
#define MAX_USER_ERR   0x2000
 
#define MHA_ErrorMsg2(x, y)   MHA_Error(__FILE__,__LINE__,(x),(y))
 
#define MHA_ErrorMsg3(x, y, z)   MHA_Error(__FILE__,__LINE__,(x),(y),(z))
 
#define MIN_TCP_PORT   0
 
#define MIN_TCP_PORT_STR   "0"
 
#define MAX_TCP_PORT   65535
 
#define MAX_TCP_PORT_STR   "65535"
 
#define IOInit   MHA_STATIC_MHAIOTCP_IOInit
 
#define IOPrepare   MHA_STATIC_MHAIOTCP_IOPrepare
 
#define IOStart   MHA_STATIC_MHAIOTCP_IOStart
 
#define IOStop   MHA_STATIC_MHAIOTCP_IOStop
 
#define IORelease   MHA_STATIC_MHAIOTCP_IORelease
 
#define IOSetVar   MHA_STATIC_MHAIOTCP_IOSetVar
 
#define IOStrError   MHA_STATIC_MHAIOTCP_IOStrError
 
#define IODestroy   MHA_STATIC_MHAIOTCP_IODestroy
 
#define dummy_interface_test   MHA_STATIC_MHAIOTCP_dummy_interface_test
 

Functions

static int copy_error (MHA_Error &e)
 
static void * thread_startup_function (void *parameter)
 
int IOInit (int fragsize, float samplerate, IOProcessEvent_t proc_event, void *proc_handle, IOStartedEvent_t start_event, void *start_handle, IOStoppedEvent_t stop_event, void *stop_handle, void **handle)
 
int IOPrepare (void *handle, int num_inchannels, int num_outchannels)
 
int IOStart (void *handle)
 
int IOStop (void *handle)
 
int IORelease (void *handle)
 
int IOSetVar (void *handle, const char *cmd, char *retval, unsigned int len)
 
const char * IOStrError (void *handle, int err)
 
void IODestroy (void *handle)
 

Variables

static char user_err_msg [MAX_USER_ERR]
 

Macro Definition Documentation

◆ ERR_SUCCESS

#define ERR_SUCCESS   0

◆ ERR_IHANDLE

#define ERR_IHANDLE   -1

◆ ERR_USER

#define ERR_USER   -1000

◆ MAX_USER_ERR

#define MAX_USER_ERR   0x2000

◆ MHA_ErrorMsg2

#define MHA_ErrorMsg2 (   x,
 
)    MHA_Error(__FILE__,__LINE__,(x),(y))

◆ MHA_ErrorMsg3

#define MHA_ErrorMsg3 (   x,
  y,
 
)    MHA_Error(__FILE__,__LINE__,(x),(y),(z))

◆ MIN_TCP_PORT

#define MIN_TCP_PORT   0

◆ MIN_TCP_PORT_STR

#define MIN_TCP_PORT_STR   "0"

◆ MAX_TCP_PORT

#define MAX_TCP_PORT   65535

◆ MAX_TCP_PORT_STR

#define MAX_TCP_PORT_STR   "65535"

◆ IOInit

#define IOInit   MHA_STATIC_MHAIOTCP_IOInit

◆ IOPrepare

#define IOPrepare   MHA_STATIC_MHAIOTCP_IOPrepare

◆ IOStart

#define IOStart   MHA_STATIC_MHAIOTCP_IOStart

◆ IOStop

#define IOStop   MHA_STATIC_MHAIOTCP_IOStop

◆ IORelease

#define IORelease   MHA_STATIC_MHAIOTCP_IORelease

◆ IOSetVar

#define IOSetVar   MHA_STATIC_MHAIOTCP_IOSetVar

◆ IOStrError

#define IOStrError   MHA_STATIC_MHAIOTCP_IOStrError

◆ IODestroy

#define IODestroy   MHA_STATIC_MHAIOTCP_IODestroy

◆ dummy_interface_test

#define dummy_interface_test (   void)    MHA_STATIC_MHAIOTCP_dummy_interface_test

Function Documentation

◆ copy_error()

static int copy_error ( MHA_Error e)
static

◆ thread_startup_function()

static void* thread_startup_function ( void *  parameter)
static

◆ IOInit()

int IOInit ( int  fragsize,
float  samplerate,
IOProcessEvent_t  proc_event,
void *  proc_handle,
IOStartedEvent_t  start_event,
void *  start_handle,
IOStoppedEvent_t  stop_event,
void *  stop_handle,
void **  handle 
)

◆ IOPrepare()

int IOPrepare ( void *  handle,
int  num_inchannels,
int  num_outchannels 
)

◆ IOStart()

int IOStart ( void *  handle)

◆ IOStop()

int IOStop ( void *  handle)

◆ IORelease()

int IORelease ( void *  handle)

◆ IOSetVar()

int IOSetVar ( void *  handle,
const char *  cmd,
char *  retval,
unsigned int  len 
)

◆ IOStrError()

const char* IOStrError ( void *  handle,
int  err 
)

◆ IODestroy()

void IODestroy ( void *  handle)

Variable Documentation

◆ user_err_msg

char user_err_msg[MAX_USER_ERR]
static