diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-02-15 02:44:20 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-02-15 02:44:20 +0100 |
commit | 22f1fce330059ef8a383cf327a023d6a9da5ad3e (patch) | |
tree | 6893f158dcaaaa1b9f1317923c32a841ba31f768 /libtoolame-dab/utils.h | |
parent | 891bb2592944aa2be2d81e1583e73e632e70537f (diff) | |
download | fdk-aac-22f1fce330059ef8a383cf327a023d6a9da5ad3e.tar.gz fdk-aac-22f1fce330059ef8a383cf327a023d6a9da5ad3e.tar.bz2 fdk-aac-22f1fce330059ef8a383cf327a023d6a9da5ad3e.zip |
Include toolame-dab as library
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 + |