mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +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
|
||||
|
||||
/**
|
||||
* 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:
|
||||
* @error_code : Error code.
|
||||
|
@ -141,6 +141,19 @@ static INLINE uint32_t prev_pow2(uint32_t v)
|
||||
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.
|
||||
* To check for multiple bits, use &&, not &.
|
||||
* For OR, | can be used. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user