diff options
Diffstat (limited to 'libtoolame-dab/utils.h')
-rw-r--r-- | libtoolame-dab/utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 <math.h> +#include <stdint.h> + +#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 + |