Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-alsa-utils: Commit

external/alsa-utils


Commit MetaInfo

Revision761e28e8acdf275fb8bbdcac16a42ac82154767b (tree)
Time2019-03-15 20:22:22
AuthorChih-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>

Change Summary

Incremental Difference

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