提交 546b189f 编写于 作者: J jp9000

libobs: Use audio-math.h for decibel conversion

上级 c82da7da
......@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "util/threading.h"
#include "util/bmem.h"
#include "media-io/audio-math.h"
#include "obs.h"
#include "obs-internal.h"
......@@ -82,16 +83,6 @@ static const char *volmeter_signals[] = {
NULL
};
static inline float mul_to_db(const float mul)
{
return (mul == 0.0f) ? -INFINITY : 20.0f * log10f(mul);
}
static inline float db_to_mul(const float db)
{
return (db == -INFINITY) ? 0.0f : powf(10.0f, db / 20.0f);
}
static float cubic_def_to_db(const float def)
{
if (def == 1.0f)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册