![]() |
The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Class for one channel/port. More...
Public Types | |
| enum | dir_t { input , output } |
Public Member Functions | |
| port_t (jack_client_t *jc, dir_t dir, int id) | |
| port_t (jack_client_t *jc, dir_t dir, const std::string &id) | |
| Constructor to create port with specific name. More... | |
| ~port_t () | |
| void | read (mha_wave_t *s, unsigned int ch) |
| void | write (mha_wave_t *s, unsigned int ch) |
| void | mute (unsigned int n) |
| void | connect_to (const char *pn) |
| const char * | get_short_name () |
| Return the port name. More... | |
Private Attributes | |
| dir_t | dir_type |
| jack_port_t * | port |
| jack_default_audio_sample_t * | iob |
| jack_client_t * | jc |
Class for one channel/port.
This class represents one JACK port. Double buffering for asynchronous process callbacks is managed by this class.
| MHAJack::port_t::port_t | ( | jack_client_t * | jc, |
| dir_t | dir, | ||
| int | id | ||
| ) |
| jc | JACK client. |
| dir | Direction (input/output). |
| id | Number in port name (starting with 1). |
| MHAJack::port_t::port_t | ( | jack_client_t * | jc, |
| dir_t | dir, | ||
| const std::string & | id | ||
| ) |
Constructor to create port with specific name.
| jc | JACK client. |
| dir | Direction (input/output). |
| id | Port name. |
| MHAJack::port_t::~port_t | ( | ) |
| void MHAJack::port_t::read | ( | mha_wave_t * | s, |
| unsigned int | ch | ||
| ) |
| s | Signal structure to store the audio data. |
| ch | Channel number in audio data structure to be used. |
| void MHAJack::port_t::write | ( | mha_wave_t * | s, |
| unsigned int | ch | ||
| ) |
| s | Signal structure from which the audio data is read. |
| ch | Channel number in audio data structure to be used. |
| void MHAJack::port_t::mute | ( | unsigned int | n | ) |
| n | Number of samples to be muted (must be the same as reported by Jack processing callback). |
| void MHAJack::port_t::connect_to | ( | const char * | pn | ) |
| pn | Port name to connect to |
| const char * MHAJack::port_t::get_short_name | ( | ) |
Return the port name.
|
private |
|
private |
|
private |
|
private |