diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-04-25 09:21:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-04-25 09:21:35 +0200 |
commit | ca5406108cb086f57222400a08fde34686ce1b3f (patch) | |
tree | 6edbfc168ea3e2a210a1d8350ba6fcf063abaa59 /src/utils.h | |
parent | 06ac740c56bfc0aaa8b67124a09dcbf91c74cdd3 (diff) | |
download | ODR-AudioEnc-ca5406108cb086f57222400a08fde34686ce1b3f.tar.gz ODR-AudioEnc-ca5406108cb086f57222400a08fde34686ce1b3f.tar.bz2 ODR-AudioEnc-ca5406108cb086f57222400a08fde34686ce1b3f.zip |
dabplus-enc-file: replace little dots by nice level indicator
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h new file mode 100644 index 0000000..c7ddc1e --- /dev/null +++ b/src/utils.h @@ -0,0 +1,17 @@ +#ifndef UTILS_H_ +#define UTILS_H_ + +#include <math.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) + + +const char* level(int channel, int* peak); + +#endif + |