The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
mha.hh File Reference

common types for MHA kernel, MHA framework applications and external plugins More...

Classes

struct  mha_complex_t
 Type for complex floating point values. More...
 
struct  mha_complex_test_array_t
 Several places in MHA rely on the fact that you can cast an array of mha_complex_t c[] to an array of mha_real_t r[] with r[0] == c[0].re r[1] == c[0].im r[2] == c[1].re ... More...
 
struct  mha_real_test_array_t
 
struct  mha_direction_t
 Channel source direction structure. More...
 
struct  mha_channel_info_t
 Channel information structure. More...
 
struct  mha_wave_t
 Waveform signal structure. More...
 
struct  mha_spec_t
 
struct  mha_audio_descriptor_t
 Description of an audio fragment (planned as a replacement of mhaconfig_t). More...
 
struct  mha_audio_t
 An audio fragment in the openMHA (planned as a replacement of mha_wave_t and mha_spec_t). More...
 
struct  mhaconfig_t
 MHA prepare configuration structure. More...
 
struct  MHA_AC::comm_var_t
 Algorithm communication variable structure. More...
 

Namespaces

 MHA_AC
 

Macros

#define MHA_CALLBACK_TEST(x)
 Test macro to compare function type definition and declaration. More...
 
#define MHA_CALLBACK_TEST_PREFIX(prefix, x)
 
#define MHA_XSTRF(x)   MHA_STRF( x )
 
#define MHA_STRF(x)   #x
 
#define MHA_VERSION_MAJOR   4
 Major version number of MHA. More...
 
#define MHA_VERSION_MINOR   18
 Minor version number of MHA. More...
 
#define MHA_VERSION_RELEASE   0
 Release number of MHA. More...
 
#define MHA_VERSION_BUILD   0
 Build number of MHA (currently unused) More...
 
#define MHA_STRUCT_SIZEMATCH   (unsigned int)((sizeof(mha_real_t)==4)+2*(sizeof(mha_complex_t)==8)+4*(sizeof(mha_wave_t)==8+2*sizeof(void*))+8*(sizeof(mha_spec_t)==8+2*sizeof(void*))+16*(sizeof(mhaconfig_t)==24))
 Test number for structure sizes. More...
 
#define MHA_VERSION   (unsigned int)((MHA_STRUCT_SIZEMATCH | (MHA_VERSION_RELEASE << 8) | (MHA_VERSION_MINOR << 16) | (MHA_VERSION_MAJOR << 24)))
 Full version number of MHA kernel. More...
 
#define MHA_VERSION_STRING   MHA_XSTRF(MHA_VERSION_MAJOR) "." MHA_XSTRF(MHA_VERSION_MINOR)
 Version string of MHA kernel (major.minor) More...
 
#define MHA_RELEASE_VERSION_STRING   MHA_XSTRF(MHA_VERSION_MAJOR) "." MHA_XSTRF(MHA_VERSION_MINOR) "." MHA_XSTRF(MHA_VERSION_RELEASE)
 Version string of MHA kernel (major.minor.release) More...
 
#define MHA_WAVEFORM   0
 
#define MHA_SPECTRUM   1
 
#define MHA_DOMAIN_MAX   2
 
#define MHA_DOMAIN_UNKNOWN   MHA_DOMAIN_MAX
 

Typedefs

typedef unsigned int mha_domain_t
 
typedef float mha_real_t
 openMHA type for real numbers More...
 
typedef void * mha_fft_t
 Handle for an FFT object. More...
 
typedef unsigned int(* MHAGetVersion_t) (void)
 
typedef int(* MHAInit_t) (MHA_AC::algo_comm_t &algo_comm, const char *algo_name, void **h)
 
typedef int(* MHAPrepare_t) (void *h, mhaconfig_t *cfg)
 
typedef int(* MHARelease_t) (void *h)
 
typedef void(* MHADestroy_t) (void *h)
 
typedef int(* MHASet_t) (void *h, const char *cmd, char *retval, unsigned int len)
 
typedef std::string(* MHASetcpp_t) (void *h, const std::string &command)
 
typedef const char *(* MHAStrError_t) (void *h, int err)
 
typedef int(* MHAProc_wave2wave_t) (void *h, mha_wave_t *sIn, mha_wave_t **sOut)
 
typedef int(* MHAProc_wave2spec_t) (void *h, mha_wave_t *sIn, mha_spec_t **sOut)
 
typedef int(* MHAProc_spec2wave_t) (void *h, mha_spec_t *sIn, mha_wave_t **sOut)
 
typedef int(* MHAProc_spec2spec_t) (void *h, mha_spec_t *sIn, mha_spec_t **sOut)
 
typedef const char *(* MHAPluginDocumentation_t) (void)
 
typedef const char *(* MHAPluginCategory_t) (void)
 

Enumerations

enum  MHA_AC_TYPE_CONSTANTS : unsigned int {
  MHA_AC_UNKNOWN = 0 , MHA_AC_CHAR = 1 , MHA_AC_INT = 2 , MHA_AC_MHAREAL = 3 ,
  MHA_AC_FLOAT = 4 , MHA_AC_DOUBLE = 5 , MHA_AC_MHACOMPLEX = 6 , MHA_AC_USER = 1000
}
 Values for the MHA_AC::comm_var_t::data_type data_type field of AC variables in MHA_AC::comm_var_t. More...
 

Detailed Description

common types for MHA kernel, MHA framework applications and external plugins

Macro Definition Documentation

◆ MHA_CALLBACK_TEST

#define MHA_CALLBACK_TEST (   x)

Test macro to compare function type definition and declaration.

◆ MHA_CALLBACK_TEST_PREFIX

#define MHA_CALLBACK_TEST_PREFIX (   prefix,
 
)

◆ MHA_XSTRF

#define MHA_XSTRF (   x)    MHA_STRF( x )

◆ MHA_STRF

#define MHA_STRF (   x)    #x

◆ MHA_VERSION_MAJOR

#define MHA_VERSION_MAJOR   4

Major version number of MHA.

◆ MHA_VERSION_MINOR

#define MHA_VERSION_MINOR   18

Minor version number of MHA.

◆ MHA_VERSION_RELEASE

#define MHA_VERSION_RELEASE   0

Release number of MHA.

◆ MHA_VERSION_BUILD

#define MHA_VERSION_BUILD   0

Build number of MHA (currently unused)

◆ MHA_STRUCT_SIZEMATCH

#define MHA_STRUCT_SIZEMATCH   (unsigned int)((sizeof(mha_real_t)==4)+2*(sizeof(mha_complex_t)==8)+4*(sizeof(mha_wave_t)==8+2*sizeof(void*))+8*(sizeof(mha_spec_t)==8+2*sizeof(void*))+16*(sizeof(mhaconfig_t)==24))

Test number for structure sizes.

◆ MHA_VERSION

#define MHA_VERSION   (unsigned int)((MHA_STRUCT_SIZEMATCH | (MHA_VERSION_RELEASE << 8) | (MHA_VERSION_MINOR << 16) | (MHA_VERSION_MAJOR << 24)))

Full version number of MHA kernel.

◆ MHA_VERSION_STRING

#define MHA_VERSION_STRING   MHA_XSTRF(MHA_VERSION_MAJOR) "." MHA_XSTRF(MHA_VERSION_MINOR)

Version string of MHA kernel (major.minor)

◆ MHA_RELEASE_VERSION_STRING

#define MHA_RELEASE_VERSION_STRING   MHA_XSTRF(MHA_VERSION_MAJOR) "." MHA_XSTRF(MHA_VERSION_MINOR) "." MHA_XSTRF(MHA_VERSION_RELEASE)

Version string of MHA kernel (major.minor.release)

◆ MHA_WAVEFORM

#define MHA_WAVEFORM   0

◆ MHA_SPECTRUM

#define MHA_SPECTRUM   1

◆ MHA_DOMAIN_MAX

#define MHA_DOMAIN_MAX   2

◆ MHA_DOMAIN_UNKNOWN

#define MHA_DOMAIN_UNKNOWN   MHA_DOMAIN_MAX

Typedef Documentation

◆ mha_domain_t

typedef unsigned int mha_domain_t

◆ MHAGetVersion_t

typedef unsigned int(* MHAGetVersion_t) (void)

◆ MHAInit_t

typedef int(* MHAInit_t) (MHA_AC::algo_comm_t &algo_comm, const char *algo_name, void **h)

◆ MHAPrepare_t

typedef int(* MHAPrepare_t) (void *h, mhaconfig_t *cfg)

◆ MHARelease_t

typedef int(* MHARelease_t) (void *h)

◆ MHADestroy_t

typedef void(* MHADestroy_t) (void *h)

◆ MHASet_t

typedef int(* MHASet_t) (void *h, const char *cmd, char *retval, unsigned int len)

◆ MHASetcpp_t

typedef std::string(* MHASetcpp_t) (void *h, const std::string &command)

◆ MHAStrError_t

typedef const char*(* MHAStrError_t) (void *h, int err)

◆ MHAProc_wave2wave_t

typedef int(* MHAProc_wave2wave_t) (void *h, mha_wave_t *sIn, mha_wave_t **sOut)

◆ MHAProc_wave2spec_t

typedef int(* MHAProc_wave2spec_t) (void *h, mha_wave_t *sIn, mha_spec_t **sOut)

◆ MHAProc_spec2wave_t

typedef int(* MHAProc_spec2wave_t) (void *h, mha_spec_t *sIn, mha_wave_t **sOut)

◆ MHAProc_spec2spec_t

typedef int(* MHAProc_spec2spec_t) (void *h, mha_spec_t *sIn, mha_spec_t **sOut)

◆ MHAPluginDocumentation_t

typedef const char*(* MHAPluginDocumentation_t) (void)

◆ MHAPluginCategory_t

typedef const char*(* MHAPluginCategory_t) (void)

Enumeration Type Documentation

◆ MHA_AC_TYPE_CONSTANTS

enum MHA_AC_TYPE_CONSTANTS : unsigned int

Values for the MHA_AC::comm_var_t::data_type data_type field of AC variables in MHA_AC::comm_var_t.

Enumerator
MHA_AC_UNKNOWN 

This value should not be used for AC variables in the AC space.

It may be used to indicate that the MHA_AC::comm_var_t struct has not yet been initialized.

MHA_AC_CHAR 

The AC variable points to value(s) of type char.

MHA_AC_INT 

The AC variable points to value(s) of type int.

MHA_AC_MHAREAL 

The AC variable points to value(s) of type mha_real_t.

MHA_AC_FLOAT 

The AC variable points to value(s) of type float.

MHA_AC_DOUBLE 

The AC variable points to value(s) of type double.

MHA_AC_MHACOMPLEX 

The AC variable points to value(s) of type mha_comples_t.

MHA_AC_USER 

This value or any higher value for the MHA_AC::comm_var_t::data_type field indicate that the AC variable is of a user-defined data type.