The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Wrapper class around the matlab-generated library. More...
Public Member Functions | |
wrapped_plugin_t ()=delete | |
wrapped_plugin_t (const char *name_) | |
Ctor. More... | |
virtual | ~wrapped_plugin_t () |
Dtor. More... | |
mha_wave_t * | process_ww (mha_wave_t *s, emxArray_user_config_t *user_config_) |
Process callback. More... | |
mha_spec_t * | process_ss (mha_spec_t *s, emxArray_user_config_t *user_config_) |
Process callback. More... | |
mha_spec_t * | process_ws (mha_wave_t *s, emxArray_user_config_t *user_config_) |
Process callback. More... | |
mha_wave_t * | process_sw (mha_spec_t *s, emxArray_user_config_t *user_config_) |
Process callback. More... | |
void | prepare (mhaconfig_t &config) |
Prepare callback. More... | |
void | release () |
Release callback. More... | |
Public Attributes | |
emxArray_user_config_t * | user_config =nullptr |
Ptr to user config array. More... | |
emxArray_user_config_t * | state =nullptr |
Ptr to state array. More... | |
Private Attributes | |
dynamiclib_t | library_handle |
Handle to matlab generated shared library. More... | |
void(* | fcn_terminate )() =nullptr |
Handle to matlab generated cleanup function. More... | |
void(* | fcn_init )(emxArray_user_config_t *, emxArray_user_config_t *) =nullptr |
Handle to matlab generated init function. More... | |
void(* | fcn_process_ww )(const emxArray_real_T *, const signal_dimensions_t *, const emxArray_user_config_t *, emxArray_user_config_t *, emxArray_real_T *) =nullptr |
Handle to matlab generated wave to wave process function. More... | |
void(* | fcn_process_ss )(const emxArray_creal_T *, const signal_dimensions_t *, const emxArray_user_config_t *, emxArray_user_config_t *, emxArray_creal_T *) =nullptr |
Handle to matlab generated spectrum to spectrum process function. More... | |
void(* | fcn_process_ws )(const emxArray_real_T *, const signal_dimensions_t *, const emxArray_user_config_t *, emxArray_user_config_t *, emxArray_creal_T *) =nullptr |
Handle to matlab generated wave to spectrum process function. More... | |
void(* | fcn_process_sw )(const emxArray_creal_T *, const signal_dimensions_t *, const emxArray_user_config_t *, emxArray_user_config_t *, emxArray_real_T *) =nullptr |
Handle to matlab generated spectrum to wave process function. More... | |
void(* | fcn_prepare )(signal_dimensions_t *, emxArray_user_config_t *, emxArray_user_config_t *) =nullptr |
Handle to matlab generated prepare function. More... | |
void(* | fcn_release )() =nullptr |
signal_dimensions_t | signal_dimensions {0,'U',0,0,0,0} |
Signal dimensions. More... | |
emxArray_real_T * | wave_in =nullptr |
Ptr to emxArray holding the input signal. More... | |
emxArray_real_T * | wave_out =nullptr |
Ptr to emxArray holding the output signal. More... | |
emxArray_creal_T * | spec_in =nullptr |
Ptr to emxArray holding the input signal. More... | |
emxArray_creal_T * | spec_out =nullptr |
Ptr to emxArray holding the output signal. More... | |
std::unique_ptr< MHASignal::waveform_t > | mha_wave_out |
MHA waveform holding the output signal. More... | |
std::unique_ptr< MHASignal::spectrum_t > | mha_spec_out |
MHA waveform holding the output signal. More... | |
Wrapper class around the matlab-generated library.
|
delete |
|
explicit |
Ctor.
Opens matlab-generated library and resolves functions
name_ | file name of shared library |
|
virtual |
Dtor.
mha_wave_t * matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::process_ww | ( | mha_wave_t * | s, |
emxArray_user_config_t * | user_config_ | ||
) |
Process callback.
Converts mha-type wave to matlab array and calls wrapped process callback, then convert output to mha type
s | input/output signal |
user_config_ | Ptr to user configuration array |
mha_spec_t * matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::process_ss | ( | mha_spec_t * | s, |
emxArray_user_config_t * | user_config_ | ||
) |
Process callback.
Converts mha-type spectrum to matlab array and calls wrapped process callback, then convert output to mha type
s | input/output signal |
user_config_ | Ptr to user configuration array |
mha_spec_t * matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::process_ws | ( | mha_wave_t * | s, |
emxArray_user_config_t * | user_config_ | ||
) |
Process callback.
Converts mha-type wave to matlab array and calls wrapped process callback, then convert output to mha type
s | input/output signal |
user_config_ | Ptr to user configuration array |
mha_wave_t * matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::process_sw | ( | mha_spec_t * | s, |
emxArray_user_config_t * | user_config_ | ||
) |
Process callback.
Converts mha-type spectrum to matlab array and calls wrapped process callback, then convert output to mha type
s | input/output signal |
user_config_ | Ptr to user configuration array |
void matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::prepare | ( | mhaconfig_t & | config | ) |
Prepare callback.
Calls wrapped prepare function if necessary and determines output signal dimensions
void matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::release | ( | void | ) |
Release callback.
Cleans up io arrays and calls wrapped release if necessary.
emxArray_user_config_t* matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::user_config =nullptr |
Ptr to user config array.
emxArray_user_config_t* matlab_wrapper::matlab_wrapper_t::wrapped_plugin_t::state =nullptr |
Ptr to state array.
|
private |
Handle to matlab generated shared library.
|
private |
Handle to matlab generated cleanup function.
|
private |
Handle to matlab generated init function.
|
private |
Handle to matlab generated wave to wave process function.
|
private |
Handle to matlab generated spectrum to spectrum process function.
|
private |
Handle to matlab generated wave to spectrum process function.
|
private |
Handle to matlab generated spectrum to wave process function.
|
private |
Handle to matlab generated prepare function.
|
private |
|
private |
Signal dimensions.
Matlab-equivalent to mha_config_t
|
private |
Ptr to emxArray holding the input signal.
|
private |
Ptr to emxArray holding the output signal.
|
private |
Ptr to emxArray holding the input signal.
|
private |
Ptr to emxArray holding the output signal.
|
private |
MHA waveform holding the output signal.
|
private |
MHA waveform holding the output signal.