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

Handles domain-specific partial input and output signal. More...

Inheritance diagram for MHAPlugin_Split::domain_handler_t:
Inheritance graph

Public Member Functions

void set_input_domain (const mhaconfig_t &settings_in)
 Set parameters of input signal. More...
 
void set_output_domain (const mhaconfig_t &settings_out)
 Set output signal parameters. More...
 
void deallocate_domains ()
 Deallocate domain indicators and signal holders. More...
 
 domain_handler_t (const mhaconfig_t &settings_in, const mhaconfig_t &settings_out, PluginLoader::fourway_processor_t *processor)
 Construct a new domain handler once the domains and dimensions of input and output signal of one of the child plugins of split are known. More...
 
virtual ~domain_handler_t ()
 Deallocation of signal holders. More...
 
unsigned put_signal (mha_wave_t *s_in, unsigned start_channel)
 Store the relevant channels from the input signal for processing. More...
 
unsigned put_signal (mha_spec_t *s_in, unsigned start_channel)
 Store the relevant channels from the input signal for processing. More...
 
unsigned get_signal (MHASignal::waveform_t *s_out, unsigned start_channel)
 Store all partial signal output channels in the combined waveform signal with the given channel offset. More...
 
unsigned get_signal (MHASignal::spectrum_t *s_out, unsigned start_channel)
 Store all partial signal output channels in the combined spectrum signal with the given channel offset. More...
 
void process ()
 Call the processing method of the processor with configured input/output signal domains. More...
 
- Public Member Functions inherited from MHAPlugin_Split::uni_processor_t
virtual ~uni_processor_t ()
 Classes containing virtual methods need virtual destructors. More...
 

Public Attributes

MHASignal::waveform_twave_in
 Partial wave input signal. More...
 
mha_wave_t ** wave_out
 Partial wave output signal. More...
 
MHASignal::spectrum_tspec_in
 Partial spec input signal. More...
 
mha_spec_t ** spec_out
 Partial spec input signal. More...
 
PluginLoader::fourway_processor_tprocessor
 The domain-specific signal processing methods are implemented here. More...
 

Private Member Functions

 domain_handler_t (const domain_handler_t &)
 Disallow copy constructor. More...
 
domain_handler_toperator= (const domain_handler_t &)
 Disallow assignment operator. More...
 

Detailed Description

Handles domain-specific partial input and output signal.

Constructor & Destructor Documentation

◆ domain_handler_t() [1/2]

MHAPlugin_Split::domain_handler_t::domain_handler_t ( const domain_handler_t )
private

Disallow copy constructor.

◆ domain_handler_t() [2/2]

MHAPlugin_Split::domain_handler_t::domain_handler_t ( const mhaconfig_t settings_in,
const mhaconfig_t settings_out,
PluginLoader::fourway_processor_t processor 
)
inline

Construct a new domain handler once the domains and dimensions of input and output signal of one of the child plugins of split are known.

◆ ~domain_handler_t()

virtual MHAPlugin_Split::domain_handler_t::~domain_handler_t ( )
inlinevirtual

Deallocation of signal holders.

Member Function Documentation

◆ operator=()

domain_handler_t& MHAPlugin_Split::domain_handler_t::operator= ( const domain_handler_t )
private

Disallow assignment operator.

◆ set_input_domain()

void MHAPlugin_Split::domain_handler_t::set_input_domain ( const mhaconfig_t settings_in)
inline

Set parameters of input signal.

Parameters
settings_indomain and dimensions of partial input signal

◆ set_output_domain()

void MHAPlugin_Split::domain_handler_t::set_output_domain ( const mhaconfig_t settings_out)
inline

Set output signal parameters.

Parameters
settings_outdomain and dimensions of partial output signal

◆ deallocate_domains()

void MHAPlugin_Split::domain_handler_t::deallocate_domains ( )
inline

Deallocate domain indicators and signal holders.

◆ put_signal() [1/2]

unsigned MHAPlugin_Split::domain_handler_t::put_signal ( mha_wave_t s_in,
unsigned  start_channel 
)
inline

Store the relevant channels from the input signal for processing.

The number of channels to store is taken from the dimensions of the partial input signal holder wave_in.

Parameters
s_inThe combined waveform input signal.
start_channelThe index (0-based) of the first channel in s_in to be copied to the partial input signal.
Returns
The number of channels that were copied from the input signal

◆ put_signal() [2/2]

unsigned MHAPlugin_Split::domain_handler_t::put_signal ( mha_spec_t s_in,
unsigned  start_channel 
)
inline

Store the relevant channels from the input signal for processing.

The number of channels to store is taken from the dimensions of the partial input signal holder spec_in.

Parameters
s_inThe combined spectrum input signal.
start_channelThe index (0-based) of the first channel in s_in to be copied to the partial input signal.
Returns
The number of channels that were copied from the input signal

◆ get_signal() [1/2]

unsigned MHAPlugin_Split::domain_handler_t::get_signal ( MHASignal::waveform_t s_out,
unsigned  start_channel 
)
inline

Store all partial signal output channels in the combined waveform signal with the given channel offset.

All channels present in wave_out will be copied. Caller may use (*wave_out)->num_channels to check the number of channels in advance.

Parameters
s_outThe combined waveform output signal.
start_channelThe channel offset (0-based) in s_out.
Returns
The number of channels that were copied to the output signal

◆ get_signal() [2/2]

unsigned MHAPlugin_Split::domain_handler_t::get_signal ( MHASignal::spectrum_t s_out,
unsigned  start_channel 
)
inline

Store all partial signal output channels in the combined spectrum signal with the given channel offset.

All channels present in spec_out will be copied. Caller may use (*spec_out)->num_channels to check the number of channels in advance.

Parameters
s_outThe combined spectrum output signal.
start_channelThe channel offset (0-based) in s_out.
Returns
The number of channels that were copied to the output signal

◆ process()

void MHAPlugin_Split::domain_handler_t::process ( void  )
inlinevirtual

Call the processing method of the processor with configured input/output signal domains.

The input signal has to be stored using put_signal before this method may be called.

Implements MHAPlugin_Split::uni_processor_t.

Member Data Documentation

◆ wave_in

MHASignal::waveform_t* MHAPlugin_Split::domain_handler_t::wave_in

Partial wave input signal.

◆ wave_out

mha_wave_t** MHAPlugin_Split::domain_handler_t::wave_out

Partial wave output signal.

◆ spec_in

MHASignal::spectrum_t* MHAPlugin_Split::domain_handler_t::spec_in

Partial spec input signal.

◆ spec_out

mha_spec_t** MHAPlugin_Split::domain_handler_t::spec_out

Partial spec input signal.

◆ processor

PluginLoader::fourway_processor_t* MHAPlugin_Split::domain_handler_t::processor

The domain-specific signal processing methods are implemented here.


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