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

Main class for JACK IO. More...

Inheritance diagram for MHAIOJack::io_jack_t:
Inheritance graph

Public Member Functions

 io_jack_t (unsigned 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 prepare (int, int)
 Allocate buffers, activate JACK client and install internal ports. More...
void release ()
- Public Member Functions inherited from MHAParser::parser_t
 parser_t (const std::string &help_text="")
 Construct detached node to be used in the configuration tree. More...
 ~parser_t ()
void insert_item (const std::string &, base_t *)
 Register a parser item into this sub-parser. More...
void remove_item (const std::string &)
 Remove an item by name. More...
void force_remove_item (const std::string &)
 Remove an item by name. More...
void remove_item (const base_t *)
 Remove an item by address. More...
- 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_perm (const std::string &)
virtual std::string query_range (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...
- Public Member Functions inherited from MHAJack::client_t
 client_t (IOProcessEvent_t proc_event, void *proc_handle=NULL, IOStartedEvent_t start_event=NULL, void *start_handle=NULL, IOStoppedEvent_t stop_event=NULL, void *stop_handle=NULL, bool use_jack_transport=false)
void prepare (const std::string &client_name, const unsigned int &nchannels_in, const unsigned int &nchannels_out)
 Allocate buffers, activate JACK client and install internal ports. More...
void prepare (const std::string &server_name, const std::string &client_name, const unsigned int &nchannels_in, const unsigned int &nchannels_out)
 Allocate buffers, ports, and activates JACK client. More...
void release ()
 Remove JACK client and deallocate internal ports and buffers. More...
void start (bool fail_on_async_jack_error=true)
void stop ()
void connect_input (const std::vector< std::string > &)
 Connect the input ports when connection variable is accessed. More...
void connect_output (const std::vector< std::string > &)
 Connect the output ports when connection variable is accessed. More...
unsigned int get_fragsize () const
float get_srate () const
unsigned long get_xruns ()
unsigned long get_xruns_reset ()
std::string str_error (int err)
void get_ports (std::vector< std::string > &, unsigned long jack_flags)
 Get a list of Jack ports. More...
std::vector< std::string > get_my_input_ports ()
std::vector< std::string > get_my_output_ports ()
void set_input_portnames (const std::vector< std::string > &)
void set_output_portnames (const std::vector< std::string > &)
float get_cpu_load ()
void set_use_jack_transport (bool ut)
bool is_prepared () const

Private Member Functions

void reconnect_inports ()
 Connect the input ports when connection variable is accessed. More...
void reconnect_outports ()
 Connect the output ports when connection variable is accessed. More...
void get_physical_input_ports ()
void get_physical_output_ports ()
void get_all_input_ports ()
void get_all_output_ports ()
void get_delays_in ()
void get_delays_out ()
void read_get_cpu_load ()
void read_get_xruns ()
void read_get_scheduler ()

Private Attributes

unsigned int fw_fragsize
float fw_samplerate
MHAParser::string_t servername
MHAParser::string_t clientname
MHAParser::vstring_t connections_in
MHAParser::vint_mon_t delays_in
MHAParser::vstring_t connections_out
MHAParser::vint_mon_t delays_out
MHAParser::vstring_t portnames_in
MHAParser::vstring_t portnames_out
MHAParser::vstring_mon_t ports_in_physical
MHAParser::vstring_mon_t ports_out_physical
MHAParser::vstring_mon_t ports_in_all
MHAParser::vstring_mon_t ports_out_all
MHAParser::parser_t ports_parser
MHAParser::float_mon_t state_cpuload
MHAParser::int_mon_t state_xruns
MHAParser::int_mon_t state_priority
MHAParser::string_mon_t state_scheduler
MHAParser::parser_t state_parser
MHAEvents::patchbay_t< io_jack_tpatchbay

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...
- Protected Member Functions inherited from MHAParser::parser_t
std::string op_subparse (expression_t &)
std::string op_setval (expression_t &)
std::string op_query (expression_t &)
std::string query_type (const std::string &)
std::string query_dump (const std::string &)
std::string query_entries (const std::string &)
std::string query_readfile (const std::string &)
std::string query_savefile (const std::string &)
std::string query_savefile_compact (const std::string &)
std::string query_savemons (const std::string &)
std::string query_val (const std::string &)
std::string query_listids (const std::string &)
void set_id_string (const std::string &)
bool has_entry (const std::string &)
- Protected Member Functions inherited from MHAParser::base_t
void activate_query (const std::string &, query_t)
void notify ()
- Protected Attributes inherited from MHAParser::base_t
query_map_t queries
bool data_is_initialized
- Protected Attributes inherited from MHAJack::client_t
jack_client_t * jc

Detailed Description

Main class for JACK IO.

This class registers a JACK client. JACK and framework states are managed by this class.

Constructor & Destructor Documentation

◆ io_jack_t()

io_jack_t::io_jack_t ( unsigned 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 

Member Function Documentation

◆ prepare()

void io_jack_t::prepare ( int  nch_in,
int  nch_out 

Allocate buffers, activate JACK client and install internal ports.

◆ release()

void io_jack_t::release ( void  )

◆ reconnect_inports()

void io_jack_t::reconnect_inports ( )

Connect the input ports when connection variable is accessed.

◆ reconnect_outports()

void io_jack_t::reconnect_outports ( )

Connect the output ports when connection variable is accessed.

◆ get_physical_input_ports()

void io_jack_t::get_physical_input_ports ( )

◆ get_physical_output_ports()

void io_jack_t::get_physical_output_ports ( )

◆ get_all_input_ports()

void io_jack_t::get_all_input_ports ( )

◆ get_all_output_ports()

void io_jack_t::get_all_output_ports ( )

◆ get_delays_in()

void io_jack_t::get_delays_in ( )

◆ get_delays_out()

void io_jack_t::get_delays_out ( )

◆ read_get_cpu_load()

void io_jack_t::read_get_cpu_load ( )

◆ read_get_xruns()

void io_jack_t::read_get_xruns ( )

◆ read_get_scheduler()

void io_jack_t::read_get_scheduler ( )

Member Data Documentation

◆ fw_fragsize

unsigned int MHAIOJack::io_jack_t::fw_fragsize

◆ fw_samplerate

float MHAIOJack::io_jack_t::fw_samplerate

◆ servername

MHAParser::string_t MHAIOJack::io_jack_t::servername

◆ clientname

MHAParser::string_t MHAIOJack::io_jack_t::clientname

◆ connections_in

MHAParser::vstring_t MHAIOJack::io_jack_t::connections_in

◆ delays_in

MHAParser::vint_mon_t MHAIOJack::io_jack_t::delays_in

◆ connections_out

MHAParser::vstring_t MHAIOJack::io_jack_t::connections_out

◆ delays_out

MHAParser::vint_mon_t MHAIOJack::io_jack_t::delays_out

◆ portnames_in

MHAParser::vstring_t MHAIOJack::io_jack_t::portnames_in

◆ portnames_out

MHAParser::vstring_t MHAIOJack::io_jack_t::portnames_out

◆ ports_in_physical

MHAParser::vstring_mon_t MHAIOJack::io_jack_t::ports_in_physical

◆ ports_out_physical

MHAParser::vstring_mon_t MHAIOJack::io_jack_t::ports_out_physical

◆ ports_in_all

MHAParser::vstring_mon_t MHAIOJack::io_jack_t::ports_in_all

◆ ports_out_all

MHAParser::vstring_mon_t MHAIOJack::io_jack_t::ports_out_all

◆ ports_parser

MHAParser::parser_t MHAIOJack::io_jack_t::ports_parser

◆ state_cpuload

MHAParser::float_mon_t MHAIOJack::io_jack_t::state_cpuload

◆ state_xruns

MHAParser::int_mon_t MHAIOJack::io_jack_t::state_xruns

◆ state_priority

MHAParser::int_mon_t MHAIOJack::io_jack_t::state_priority

◆ state_scheduler

MHAParser::string_mon_t MHAIOJack::io_jack_t::state_scheduler

◆ state_parser

MHAParser::parser_t MHAIOJack::io_jack_t::state_parser

◆ patchbay

MHAEvents::patchbay_t<io_jack_t> MHAIOJack::io_jack_t::patchbay

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