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

Generic client for synchronous playback and recording of waveform fragments. More...

Inheritance diagram for MHAJack::client_noncont_t:
Inheritance graph

Public Member Functions

 client_noncont_t (const std::string &name, bool use_jack_transport=false)
 
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)
 
- 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_tsn_in
 
mha_wave_tsn_out
 
std::string name
 
MHASignal::waveform_tfrag_out
 

Additional Inherited Members

- Protected Attributes inherited from MHAJack::client_t
jack_client_t * jc
 

Detailed Description

Generic client for synchronous playback and recording of waveform fragments.

Constructor & Destructor Documentation

◆ client_noncont_t()

MHAJack::client_noncont_t::client_noncont_t ( const std::string &  name,
bool  use_jack_transport = false 
)

Member Function Documentation

◆ io()

void MHAJack::client_noncont_t::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 
)

◆ proc() [1/2]

int MHAJack::client_noncont_t::proc ( void *  handle,
mha_wave_t sIn,
mha_wave_t **  sOut 
)
staticprivate

◆ IOStoppedEvent() [1/2]

void MHAJack::client_noncont_t::IOStoppedEvent ( void *  handle,
int  proc_err,
int  io_err 
)
staticprivate

◆ proc() [2/2]

void MHAJack::client_noncont_t::proc ( mha_wave_t sIn,
mha_wave_t **  sOut 
)
private

◆ IOStoppedEvent() [2/2]

void MHAJack::client_noncont_t::IOStoppedEvent ( )
private

Member Data Documentation

◆ b_stopped

bool MHAJack::client_noncont_t::b_stopped
private

◆ pos

unsigned int MHAJack::client_noncont_t::pos
private

◆ sn_in

mha_wave_t* MHAJack::client_noncont_t::sn_in
private

◆ sn_out

mha_wave_t* MHAJack::client_noncont_t::sn_out
private

◆ name

std::string MHAJack::client_noncont_t::name
private

◆ frag_out

MHASignal::waveform_t* MHAJack::client_noncont_t::frag_out
private

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