Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-alsa-utils: Commit

external/alsa-utils


Commit MetaInfo

Revisión18fcbace8b2fd0c30a42904f334bd1ebc18bf6f7 (tree)
Tiempo2019-11-25 18:11:52
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

alsamixer: add exp10 for Android

Android doesn't have exp10 yet. Define it as before commit 116488e5f2f.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

Cambiar Resumen

Diferencia

--- a/alsamixer/volume_mapping.c
+++ b/alsamixer/volume_mapping.c
@@ -36,6 +36,11 @@
3636 #include <stdbool.h>
3737 #include "volume_mapping.h"
3838
39+#ifdef ANDROID
40+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
41+#define exp10(x) (exp((x) * log(10)))
42+#endif /* ANDROID */
43+
3944 #define MAX_LINEAR_DB_SCALE 24
4045
4146 static inline bool use_linear_dB_scale(long dBmin, long dBmax)
Show on old repository browser