The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Functions | |
bool | is_multiple_of (const unsigned big, const unsigned small) |
bool | is_power_of_two (const unsigned n) |
bool | is_multiple_of_by_power_of_two (const unsigned big, const unsigned small) |
std::string | strip (const std::string &line) |
std::string | remove (const std::string &str_, char c) |
bool | is_denormal (mha_real_t x) |
Get the normal-ness of a mha_real_t. More... | |
bool | is_denormal (const mha_complex_t &x) |
Get the normal-ness of a complex number. More... | |
bool | is_denormal (const std::complex< mha_real_t > &x) |
Get the normal-ness of a complex number. More... | |
mha_real_t | spl2hl (mha_real_t f) |
Get the offset of between dB(SPL) and dB(HL) for a given frequency according to ISO 389-7:2005 (freefield); e.g. More... | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the normal-ness of a mha_real_t.
Returns true iff x is not equal to zero and the absolute value of x is smaller than the minimum positive normalized value of mha_real_t.
x | A mha_real_t floating point number |
|
inline |
Get the normal-ness of a complex number.
Overload for mha_complex_t. Returns true iff one or both of real and imaginary part are denormal
x | [in] A mha_complex_t number |
|
inline |
Get the normal-ness of a complex number.
Overload for std::complex Returns true iff one or both of real and imaginary part are denormal.
x | [in] A mha_complex_t number |
mha_real_t MHAUtils::spl2hl | ( | mha_real_t | f | ) |
Get the offset of between dB(SPL) and dB(HL) for a given frequency according to ISO 389-7:2005 (freefield); e.g.
an intensity of 22.1 dB(SPL) at 125 Hz is equivalent to 0 dB(HL), so spl2hl(125)=-22.1. Interpolation between mesh points is linear. The correction values for frequencies above 16 kHz are extrapolated."
[in] | f | The frequency in Hz for which the offset shall be returned |
MHA_Error | if f<0 |