The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHAMultiSrc::spectrum_t Class Reference
Inheritance diagram for MHAMultiSrc::spectrum_t:
Inheritance graph

Public Member Functions

 spectrum_t (MHA_AC::algo_comm_t &iac, std::string name, unsigned int frames, unsigned int channels)
 
mha_spec_tupdate (mha_spec_t *s)
 Update data of spectrum to hold actual input data. More...
 
- Public Member Functions inherited from MHA_AC::spectrum_t
 spectrum_t (algo_comm_t &ac, const std::string &name, unsigned int bins, unsigned int channels, bool insert_now)
 Initialize memory and metadata of the AC variable. More...
 
 ~spectrum_t ()
 Destroy the AC variable: deallocate its memory. More...
 
void insert ()
 Insert or re-insert AC variable into AC space. More...
 
void remove ()
 Remove the AC variable by reference from the AC variable space. More...
 
- Public Member Functions inherited from MHASignal::spectrum_t
 spectrum_t (const unsigned int &frames, const unsigned int &channels)
 constructor of spectrum class More...
 
 spectrum_t (const mha_spec_t &)
 Copy constructor. More...
 
 spectrum_t (const MHASignal::spectrum_t &)
 Copy constructor. More...
 
 spectrum_t (const std::vector< mha_complex_t > &)
 
mha_complex_toperator() (unsigned int f, unsigned int ch)
 Access to element. More...
 
mha_complex_toperator[] (unsigned int k)
 Access to a single element, direct index into data buffer. More...
 
mha_complex_tvalue (unsigned int f, unsigned int ch)
 Access to element. More...
 
void copy (const mha_spec_t &)
 copy all elements from a spectrum More...
 
void copy_channel (const mha_spec_t &s, unsigned sch, unsigned dch)
 Copy one channel of a given spectrum signal to a target channel. More...
 
void export_to (mha_spec_t &)
 copy elements to spectrum structure More...
 
void scale (const unsigned int &, const unsigned int &, const unsigned int &, const mha_real_t &)
 scale section [a,b) in channel "ch" by "val" More...
 
void scale_channel (const unsigned int &, const mha_real_t &)
 scale all elements in one channel More...
 
- Public Member Functions inherited from MHAMultiSrc::base_t
 base_t (MHA_AC::algo_comm_t &iac)
 
void select_source (const std::vector< std::string > &src, int in_channels)
 Change the selection of input sources. More...
 

Additional Inherited Members

- Public Attributes inherited from mha_spec_t
mha_complex_tbuf
 signal buffer More...
 
unsigned int num_channels
 number of channels More...
 
unsigned int num_frames
 number of frames in each channel More...
 
mha_channel_info_tchannel_info
 detailed channel description More...
 
- Protected Member Functions inherited from MHAPlugin::config_t< MHAMultiSrc::channels_t >
MHAMultiSrc::channels_tpoll_config ()
 Receive the latest run time configuration. More...
 
MHAMultiSrc::channels_tpeek_config () const
 Receive the latest run time configuration without changing the configuration pointer. More...
 
void push_config (MHAMultiSrc::channels_t *ncfg)
 Push a new run time configuration into the configuration fifo. More...
 
void cleanup_unused_cfg ()
 To be called by the push_config() for housekeeping. More...
 
void remove_all_cfg ()
 To be called on Plugin destruction, will delete all runtime configuration list nodes and objects regardless of their in_use flag. More...
 
 config_t ()
 
 ~config_t ()
 
- Protected Attributes inherited from MHA_AC::spectrum_t
algo_comm_tac
 AC variable space. More...
 
const std::string name
 Name of this AC variable in the AC variable space. More...
 
const bool remove_during_destructor
 flag whether to remove from AC variable space in destructor. More...
 
- Protected Attributes inherited from MHAMultiSrc::base_t
MHA_AC::algo_comm_tac
 
- Protected Attributes inherited from MHAPlugin::config_t< MHAMultiSrc::channels_t >
MHAMultiSrc::channels_tcfg
 Pointer to the runtime configuration currently used by the signal processing thread. More...
 

Constructor & Destructor Documentation

◆ spectrum_t()

MHAMultiSrc::spectrum_t::spectrum_t ( MHA_AC::algo_comm_t iac,
std::string  name,
unsigned int  frames,
unsigned int  channels 
)

Member Function Documentation

◆ update()

mha_spec_t * MHAMultiSrc::spectrum_t::update ( mha_spec_t s)

Update data of spectrum to hold actual input data.

Parameters
sInput signal chunk
Returns
Return pointer to spectrum structure

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