diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-04-17 01:54:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-04-17 01:54:12 +0300 |
commit | eb5f6b9b5507607635726f85ef7e1842a7eaaf7e (patch) | |
tree | f71ea93988642a31ae0608eb93bb88119bad7b6c /src/util.h | |
parent | d72ddf8d7f97661f4a60cd19c64fd7e56abe5fa2 (diff) | |
download | atracdenc-eb5f6b9b5507607635726f85ef7e1842a7eaaf7e.tar.gz |
atrac3 analyze and synthesis MLT and possibility to apply gain info
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..e167655 --- /dev/null +++ b/src/util.h @@ -0,0 +1,12 @@ +#pragma once +#include <cstdint> + + +template<class T> +inline void SwapArray(T* p, const size_t len) { + for (size_t i = 0, j = len - 1; i < len / 2; ++i, --j) { + T tmp = p[i]; + p[i] = p[j]; + p[j] = tmp; + } +} |