mirror of
https://github.com/libretro/RetroArch
synced 2025-03-21 13:20:52 +00:00
move db_to_gain to retro_miscellaneous.h
This commit is contained in:
parent
73fcbe3786
commit
d1b9dbe7dc
13
general.h
13
general.h
@ -129,19 +129,6 @@ extern struct defaults g_defaults;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* db_to_gain:
|
|
||||||
* @db : Decibels.
|
|
||||||
*
|
|
||||||
* Converts decibels to voltage gain.
|
|
||||||
*
|
|
||||||
* Returns: voltage gain value.
|
|
||||||
**/
|
|
||||||
static INLINE float db_to_gain(float db)
|
|
||||||
{
|
|
||||||
return powf(10.0f, db / 20.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retro_fail:
|
* retro_fail:
|
||||||
* @error_code : Error code.
|
* @error_code : Error code.
|
||||||
|
@ -141,6 +141,19 @@ static INLINE uint32_t prev_pow2(uint32_t v)
|
|||||||
return v - (v >> 1);
|
return v - (v >> 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* db_to_gain:
|
||||||
|
* @db : Decibels.
|
||||||
|
*
|
||||||
|
* Converts decibels to voltage gain.
|
||||||
|
*
|
||||||
|
* Returns: voltage gain value.
|
||||||
|
**/
|
||||||
|
static INLINE float db_to_gain(float db)
|
||||||
|
{
|
||||||
|
return powf(10.0f, db / 20.0f);
|
||||||
|
}
|
||||||
|
|
||||||
/* Helper macros and struct to keep track of many booleans.
|
/* Helper macros and struct to keep track of many booleans.
|
||||||
* To check for multiple bits, use &&, not &.
|
* To check for multiple bits, use &&, not &.
|
||||||
* For OR, | can be used. */
|
* For OR, | can be used. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user