diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-07-17 17:50:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-07-17 17:50:38 +0300 |
commit | 842bd06107983bf1775e9c1bbafc8cbe43ffb164 (patch) | |
tree | 4808bed3ae63572f092686f2e93ff44a2676abaa /src/util.h | |
parent | 1151d5831f19a9f24dd0c545a4968606712a62d2 (diff) | |
download | atracdenc-842bd06107983bf1775e9c1bbafc8cbe43ffb164.tar.gz |
Experimental implementation of gain control.atrac3_gaincontrol
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2,6 +2,7 @@ #include <cstdint> #include <vector> #include <algorithm> +#include <cmath> #include "config.h" @@ -30,7 +31,7 @@ inline uint16_t GetFirstSetBit(uint32_t x) { template<class T> inline uint16_t Log2FloatToIdx(T x, uint16_t shift) { T t = x * shift; - return GetFirstSetBit(t); + return GetFirstSetBit(std::trunc(t)); } template<class T> |