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

Implements split plugin. More...

Inheritance diagram for MHAPlugin_Split::split_t:
Inheritance graph

Public Member Functions

 split_t (MHA_AC::algo_comm_t &iac, const std::string &configured_name)
 Plugin constructor. More...
 
 ~split_t ()
 Plugin destructor. Unloads nested plugins. More...
 
void prepare_ (mhaconfig_t &)
 Check signal parameters, prepare chains, and allocate output signal holders. More...
 
void release_ ()
 Delete output signal holder and release chains. More...
 
template<class SigTypeIn , class SigTypeOut >
void process (SigTypeIn *, SigTypeOut **)
 Let the parallel plugins process channel groups of the input signal. More...
 
- 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...
 

Private Member Functions

void update ()
 Load plugins in response to a value change in the algos variable. More...
 
void clear_chains ()
 Unload the plugins. More...
 
mha_wave_tcopy_output_wave ()
 
mha_spec_tcopy_output_spec ()
 
template<class SigType >
void trigger_processing (SigType *s_in)
 Split the argument input signal to groups of channels for the plugins and initiate signal processing. More...
 
template<class SigType >
void collect_result (SigType *s_out)
 Combine the output signal from the plugins. More...
 
MHASignal::waveform_tsignal_out (mha_wave_t **)
 Waveform domain output signal structure accessor. More...
 
MHASignal::spectrum_tsignal_out (mha_spec_t **)
 Spectrum domain output signal structure. Parameter is ignored. More...
 

Private Attributes

MHAEvents::patchbay_t< split_tpatchbay
 Reload plugins when the algos variable changes. More...
 
MHAParser::vstring_t algos
 Vector of plugins to load in parallel. More...
 
MHAParser::vint_t channels
 Number of channels to route through each plugin. More...
 
MHAParser::kw_t thread_platform
 Thread platform chooser. More...
 
MHAParser::kw_t worker_thread_scheduler
 Scheduler used for worker threads. More...
 
MHAParser::int_t worker_thread_priority
 Priority of worker threads. More...
 
MHAParser::string_mon_t framework_thread_scheduler
 Scheduler of the signal processing thread. More...
 
MHAParser::int_mon_t framework_thread_priority
 Priority of signal processing thread. More...
 
MHAParser::bool_t delay
 Switch to activate parallel processing of plugins at the cost of one block of additional delay. More...
 
std::vector< splitted_part_t * > chains
 Interfaces to parallel plugins. More...
 
MHASignal::waveform_twave_out
 Combined output waveforms structure. More...
 
MHASignal::spectrum_tspec_out
 Combined output spectra structure. More...
 

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
 

Detailed Description

Implements split plugin.

An instance of class split_t implements the split plugin functionality: The audio channels are splitted and groups of audio channels are processed by different plugins in parallel.

Constructor & Destructor Documentation

◆ split_t()

MHAPlugin_Split::split_t::split_t ( MHA_AC::algo_comm_t iac,
const std::string &  configured_name 
)

Plugin constructor.

◆ ~split_t()

MHAPlugin_Split::split_t::~split_t ( )

Plugin destructor. Unloads nested plugins.

Member Function Documentation

◆ prepare_()

void MHAPlugin_Split::split_t::prepare_ ( mhaconfig_t signal_parameters)

Check signal parameters, prepare chains, and allocate output signal holders.

◆ release_()

void MHAPlugin_Split::split_t::release_ ( )

Delete output signal holder and release chains.

◆ process()

template<class SigTypeIn , class SigTypeOut >
void MHAPlugin_Split::split_t::process ( SigTypeIn *  s_in,
SigTypeOut **  s_out 
)

Let the parallel plugins process channel groups of the input signal.

◆ update()

void MHAPlugin_Split::split_t::update ( )
private

Load plugins in response to a value change in the algos variable.

◆ clear_chains()

void MHAPlugin_Split::split_t::clear_chains ( )
private

Unload the plugins.

◆ copy_output_wave()

mha_wave_t* MHAPlugin_Split::split_t::copy_output_wave ( )
private

◆ copy_output_spec()

mha_spec_t* MHAPlugin_Split::split_t::copy_output_spec ( )
private

◆ trigger_processing()

template<class SigType >
void MHAPlugin_Split::split_t::trigger_processing ( SigType *  s_in)
private

Split the argument input signal to groups of channels for the plugins and initiate signal processing.

◆ collect_result()

template<class SigType >
void MHAPlugin_Split::split_t::collect_result ( SigType *  s_out)
private

Combine the output signal from the plugins.

◆ signal_out() [1/2]

MHASignal::waveform_t* MHAPlugin_Split::split_t::signal_out ( mha_wave_t **  )
inlineprivate

Waveform domain output signal structure accessor.

Parameter is only for domain disambiguation and is ignored.

◆ signal_out() [2/2]

MHASignal::spectrum_t* MHAPlugin_Split::split_t::signal_out ( mha_spec_t **  )
inlineprivate

Spectrum domain output signal structure. Parameter is ignored.

Member Data Documentation

◆ patchbay

MHAEvents::patchbay_t<split_t> MHAPlugin_Split::split_t::patchbay
private

Reload plugins when the algos variable changes.

◆ algos

MHAParser::vstring_t MHAPlugin_Split::split_t::algos
private

Vector of plugins to load in parallel.

◆ channels

MHAParser::vint_t MHAPlugin_Split::split_t::channels
private

Number of channels to route through each plugin.

◆ thread_platform

MHAParser::kw_t MHAPlugin_Split::split_t::thread_platform
private

Thread platform chooser.

◆ worker_thread_scheduler

MHAParser::kw_t MHAPlugin_Split::split_t::worker_thread_scheduler
private

Scheduler used for worker threads.

◆ worker_thread_priority

MHAParser::int_t MHAPlugin_Split::split_t::worker_thread_priority
private

Priority of worker threads.

◆ framework_thread_scheduler

MHAParser::string_mon_t MHAPlugin_Split::split_t::framework_thread_scheduler
private

Scheduler of the signal processing thread.

◆ framework_thread_priority

MHAParser::int_mon_t MHAPlugin_Split::split_t::framework_thread_priority
private

Priority of signal processing thread.

◆ delay

MHAParser::bool_t MHAPlugin_Split::split_t::delay
private

Switch to activate parallel processing of plugins at the cost of one block of additional delay.

◆ chains

std::vector<splitted_part_t*> MHAPlugin_Split::split_t::chains
private

Interfaces to parallel plugins.

◆ wave_out

MHASignal::waveform_t* MHAPlugin_Split::split_t::wave_out
private

Combined output waveforms structure.

◆ spec_out

MHASignal::spectrum_t* MHAPlugin_Split::split_t::spec_out
private

Combined output spectra structure.


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