diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-07-07 22:34:08 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-07-07 22:34:08 +0200 |
commit | 4dc3f5aa76463250197f0a87145d37884509e9af (patch) | |
tree | c5ed5de31c552a254d2074bca17f347b1a5dfc4c /src/OutputMemory.h | |
parent | c9ef2a5b36d9082b2c2c853934a0332aef6564a6 (diff) | |
download | dabmod-4dc3f5aa76463250197f0a87145d37884509e9af.tar.gz dabmod-4dc3f5aa76463250197f0a87145d37884509e9af.tar.bz2 dabmod-4dc3f5aa76463250197f0a87145d37884509e9af.zip |
Add rudimentary sample histogram to OutputMemory
Diffstat (limited to 'src/OutputMemory.h')
-rw-r--r-- | src/OutputMemory.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/OutputMemory.h b/src/OutputMemory.h index e687bb3..2dd49c5 100644 --- a/src/OutputMemory.h +++ b/src/OutputMemory.h @@ -1,6 +1,11 @@ /* Copyright (C) 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) + + Copyright (C) 2014 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://opendigitalradio.org */ /* This file is part of ODR-DabMod. @@ -26,6 +31,18 @@ # include "config.h" #endif +// This enables a rudimentary histogram functionality +// It gets printed when the OutputMemory gets destroyed +#define OUTPUT_MEM_HISTOGRAM 0 + +#if OUTPUT_MEM_HISTOGRAM +// The samples can go up to 100000 in value, make +// sure that HIST_BINS * HIST_BIN_SIZE is large +// enough ! +# define HIST_BINS 10 +# define HIST_BIN_SIZE 10000 +#endif + #include "ModOutput.h" @@ -42,7 +59,14 @@ public: protected: Buffer* myDataOut; -}; +#if OUTPUT_MEM_HISTOGRAM + // keep track of max value + float myMax; + + long int myHistogram[HIST_BINS]; +#endif +}; #endif // OUTPUT_MEMORY_H + |