The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
io_lib_t Class Reference

Class for loading MHA sound IO module. More...

Inheritance diagram for io_lib_t:
Inheritance graph

Public Member Functions

 io_lib_t (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, std::string libname)
 load and initialize MHA sound io module. More...
 ~io_lib_t ()
 Deinitialize and unload this MHA sound io module. More...
void prepare (unsigned int inch, unsigned int outch)
 Prepare the sound io module. More...
void start ()
 Tell the sound io module to start sound processing. More...
void stop ()
void release ()
std::string lib_str_error (int err)
std::string get_documentation () const
std::vector< std::string > get_categories () const
- Public Member Functions inherited from MHAParser::c_ifc_parser_t
 c_ifc_parser_t (const std::string &modulename_)
 ~c_ifc_parser_t ()
void set_parse_cb (c_parse_cmd_t, c_parse_err_t, void *)
- Public Member Functions inherited from MHAParser::base_t
 base_t (const std::string &)
 Constructor for base class of all parser nodes. More...
 base_t (const base_t &)
 Copy constructor for base_t. More...
base_toperator= (const base_t &)=default
 base_t (base_t &&)=delete
base_toperator= (base_t &&)=delete
virtual ~base_t ()
virtual std::string parse (const std::string &)
 Causes this node to process a command in the openMHA configuration language. More...
virtual void parse (const char *, char *, unsigned int)
 This function parses a command and writes the parsing result into a C character array. More...
virtual void parse (const std::vector< std::string > &, std::vector< std::string > &)
virtual std::string query_dump (const std::string &)
virtual std::string query_entries (const std::string &)
virtual std::string query_perm (const std::string &)
virtual std::string query_range (const std::string &)
virtual std::string query_type (const std::string &)
virtual std::string query_val (const std::string &)
virtual std::string query_readfile (const std::string &)
virtual std::string query_savefile (const std::string &)
virtual std::string query_savefile_compact (const std::string &)
virtual std::string query_savemons (const std::string &)
virtual std::string query_listids (const std::string &)
std::string query_version (const std::string &)
std::string query_id (const std::string &)
std::string query_subst (const std::string &)
std::string query_addsubst (const std::string &)
std::string query_help (const std::string &)
std::string query_cmds (const std::string &)
void set_node_id (const std::string &)
 Set the identification string of this parser node. More...
void set_help (const std::string &)
 Set the help comment of a variable or parser. More...
void add_parent_on_insert (parser_t *, std::string)
void rm_parent_on_remove (parser_t *)
const std::string & fullname () const
 Return the full dot-separated path name of this parser node in the openMHA configuration tree. More...

Protected Member Functions

void test_error ()
- Protected Member Functions inherited from MHAParser::c_ifc_parser_t
std::string op_subparse (MHAParser::expression_t &)
std::string op_setval (MHAParser::expression_t &)
std::string op_query (MHAParser::expression_t &)
- Protected Member Functions inherited from MHAParser::base_t
void activate_query (const std::string &, query_t)
void notify ()

Protected Attributes

int lib_err
pluginlib_t lib_handle
void * lib_data
IOInit_t IOInit_cb
IOPrepare_t IOPrepare_cb
IOStart_t IOStart_cb
IOStop_t IOStop_cb
IORelease_t IORelease_cb
IOSetVar_t IOSetVar_cb
IOStrError_t IOStrError_cb
IODestroy_t IODestroy_cb
std::string plugin_documentation
std::vector< std::string > plugin_categories
- Protected Attributes inherited from MHAParser::base_t
query_map_t queries
bool data_is_initialized

Additional Inherited Members

- Public Attributes inherited from MHAParser::base_t
MHAEvents::emitter_t writeaccess
 Event emitted on write access. More...
MHAEvents::emitter_t valuechanged
 Event emitted if the value has changed. More...
MHAEvents::emitter_t readaccess
 Event emitted on read access. More...
MHAEvents::emitter_t prereadaccess
 Event emitted on read access, before the data field is accessed. More...

Detailed Description

Class for loading MHA sound IO module.

Constructor & Destructor Documentation

◆ io_lib_t()

io_lib_t::io_lib_t ( 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,
std::string  libname 

load and initialize MHA sound io module.

◆ ~io_lib_t()

io_lib_t::~io_lib_t ( )

Deinitialize and unload this MHA sound io module.

Member Function Documentation

◆ prepare()

void io_lib_t::prepare ( unsigned int  inch,
unsigned int  outch 

Prepare the sound io module.

After preparation, the sound io module may start the sound processing at any time (external trigger). When the sound processing is started, the sound io module will call the start_event callback.

inchnumber of input channels
outchnumber of output channels

◆ start()

void io_lib_t::start ( )

Tell the sound io module to start sound processing.

Some io modules need this, for others that wait for external events this method might do nothing.

◆ stop()

void io_lib_t::stop ( )

◆ release()

void io_lib_t::release ( )

◆ lib_str_error()

std::string io_lib_t::lib_str_error ( int  err)

◆ get_documentation()

std::string io_lib_t::get_documentation ( ) const

◆ get_categories()

std::vector<std::string> io_lib_t::get_categories ( ) const

◆ test_error()

void io_lib_t::test_error ( )

Member Data Documentation

◆ lib_err

int io_lib_t::lib_err

◆ lib_handle

pluginlib_t io_lib_t::lib_handle

◆ lib_data

void* io_lib_t::lib_data

◆ IOInit_cb

IOInit_t io_lib_t::IOInit_cb

◆ IOPrepare_cb

IOPrepare_t io_lib_t::IOPrepare_cb

◆ IOStart_cb

IOStart_t io_lib_t::IOStart_cb

◆ IOStop_cb

IOStop_t io_lib_t::IOStop_cb

◆ IORelease_cb

IORelease_t io_lib_t::IORelease_cb

◆ IOSetVar_cb

IOSetVar_t io_lib_t::IOSetVar_cb

◆ IOStrError_cb

IOStrError_t io_lib_t::IOStrError_cb

◆ IODestroy_cb

IODestroy_t io_lib_t::IODestroy_cb

◆ plugin_documentation

std::string io_lib_t::plugin_documentation

◆ plugin_categories

std::vector<std::string> io_lib_t::plugin_categories

The documentation for this class was generated from the following files: