From 22f1fce330059ef8a383cf327a023d6a9da5ad3e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 15 Feb 2016 02:44:20 +0100 Subject: Include toolame-dab as library --- libtoolame-dab/utils.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libtoolame-dab/utils.h (limited to 'libtoolame-dab/utils.h') diff --git a/libtoolame-dab/utils.h b/libtoolame-dab/utils.h new file mode 100644 index 0000000..7d98ab6 --- /dev/null +++ b/libtoolame-dab/utils.h @@ -0,0 +1,20 @@ +#ifndef _UTILS_H_ +#define _UTILS_H_ + +#include +#include + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + +#define NUMOF(l) (sizeof(l) / sizeof(*l)) + +#define linear_to_dB(x) (log10(x) * 20) + +/* Calculate the little string containing a bargraph + * 'VU-meter' from the peak value measured + */ +const char* level(int channel, int* peak); + +#endif + -- cgit v1.2.3