瀏覽代碼

libobs: Use audio-math.h for decibel conversion

jp9000 10 年之前
父節點
當前提交
546b189f05
共有 1 個文件被更改,包括 1 次插入10 次删除
  1. 1 10
      libobs/obs-audio-controls.c

+ 1 - 10
libobs/obs-audio-controls.c

@@ -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)