The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Generic JACK client for averaging a system response across time. More...
Public Member Functions | |
client_avg_t (const std::string &name, const unsigned int &nrep_) | |
Constructor for averaging client. More... | |
void | io (mha_wave_t *s_out, mha_wave_t *s_in, const std::vector< std::string > &p_out, const std::vector< std::string > &p_in, float *srate=NULL, unsigned int *fragsize=NULL) |
Recording function. 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 | proc (mha_wave_t *sIn, mha_wave_t **sOut) |
void | IOStoppedEvent () |
Static Private Member Functions | |
static int | proc (void *handle, mha_wave_t *sIn, mha_wave_t **sOut) |
static void | IOStoppedEvent (void *handle, int proc_err, int io_err) |
Private Attributes | |
bool | b_stopped |
unsigned int | pos |
mha_wave_t * | sn_in |
mha_wave_t * | sn_out |
std::string | name |
MHASignal::waveform_t * | frag_out |
const unsigned int | nrep |
unsigned int | n |
bool | b_ready |
Additional Inherited Members | |
Protected Attributes inherited from MHAJack::client_t | |
jack_client_t * | jc |
Generic JACK client for averaging a system response across time.
MHAJack::client_avg_t::client_avg_t | ( | const std::string & | name_, |
const unsigned int & | nrep_ | ||
) |
Constructor for averaging client.
name_ | Name of JACK client |
nrep_ | Number of repetitions |
void MHAJack::client_avg_t::io | ( | mha_wave_t * | is_out, |
mha_wave_t * | is_in, | ||
const std::vector< std::string > & | p_out, | ||
const std::vector< std::string > & | p_in, | ||
float * | srate = NULL , |
||
unsigned int * | fragsize = NULL |
||
) |
Recording function.
long-description
is_out | Input (test) signal, which will be repeated |
is_in | System response (averaged, same length as input required) |
p_out | Ports to play back the test signal |
p_in | Ports to record from the system response |
srate | Pointer to sampling rate variable, will be filled with server sampling rate |
fragsize | Pointer to fragment size variable, will be filled with server fragment size |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |