diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-09-22 21:38:37 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-09-22 21:38:37 +0200 |
commit | 01bcfc5d692236bffeec5b8de2c27138e71d2bd6 (patch) | |
tree | caeef2a186acb074388484f78c4445353afe5ac1 /utils.h | |
parent | a0bbc1d61bff38e5db76d3e11813551977411543 (diff) | |
download | toolame-dab-01bcfc5d692236bffeec5b8de2c27138e71d2bd6.tar.gz toolame-dab-01bcfc5d692236bffeec5b8de2c27138e71d2bd6.tar.bz2 toolame-dab-01bcfc5d692236bffeec5b8de2c27138e71d2bd6.zip |
Add -L option to print level
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 + |