diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2025-05-31 18:00:33 +0200 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2025-05-31 18:00:33 +0200 |
commit | 6dfc60e9d4791c3385908c61ad75c4a0093ea1eb (patch) | |
tree | 937b5fe54e21692ea5cd10284b5e3cf60a710454 | |
parent | bb6068829b9dbe1102143a7b69e84ecf4526a1df (diff) | |
download | atracdenc-at3plus-dev.tar.gz |
[AT3P] Fix for Windows buildat3plus-dev
-rw-r--r-- | src/atrac/at3p/at3p_bitstream.h | 2 | ||||
-rw-r--r-- | src/atrac/at3p/at3p_gha_ut.cpp | 5 | ||||
-rw-r--r-- | src/atrac/at3p/at3p_tables.cpp | 3 | ||||
-rw-r--r-- | src/atrac/at3p/ff/atrac3plusdsp.c | 1 | ||||
m--------- | src/lib/libgha | 0 | ||||
-rw-r--r-- | src/util.h | 5 |
6 files changed, 12 insertions, 4 deletions
diff --git a/src/atrac/at3p/at3p_bitstream.h b/src/atrac/at3p/at3p_bitstream.h index c42a151..25edd1e 100644 --- a/src/atrac/at3p/at3p_bitstream.h +++ b/src/atrac/at3p/at3p_bitstream.h @@ -24,7 +24,7 @@ namespace NAtracDEnc { -class TScaledBlock; +struct TScaledBlock; struct TAt3PGhaData; diff --git a/src/atrac/at3p/at3p_gha_ut.cpp b/src/atrac/at3p/at3p_gha_ut.cpp index e25d948..a3cacec 100644 --- a/src/atrac/at3p/at3p_gha_ut.cpp +++ b/src/atrac/at3p/at3p_gha_ut.cpp @@ -1,6 +1,7 @@ #include "at3p_bitstream.h" #include "at3p_gha.h" #include "oma.h" +#include "util.h" #include <gtest/gtest.h> #include <cmath> #include <vector> @@ -18,7 +19,7 @@ struct TTestParam { uint16_t end; }; -static void __attribute__ ((noinline)) Gen(const TTestParam& p, vector<float>& out) +static void atde_noinline Gen(const TTestParam& p, vector<float>& out) { float freq = p.freq / (44100.0 / 16.0); float a = p.amplitude; @@ -35,7 +36,7 @@ static TAt3PGhaData DoAnalize(IGhaProcessor* p, IGhaProcessor::TBufPtr b1, IGhaP return *p->DoAnalize(b1, b2, w1, w2); } -static const TAt3PGhaData __attribute__ ((noinline)) GenAndRunGha(vector<TTestParam> p1, vector<TTestParam> p2) +static const TAt3PGhaData atde_noinline GenAndRunGha(vector<TTestParam> p1, vector<TTestParam> p2) { vector<float> buf1(2048 * 2); diff --git a/src/atrac/at3p/at3p_tables.cpp b/src/atrac/at3p/at3p_tables.cpp index a4d6021..fee3417 100644 --- a/src/atrac/at3p/at3p_tables.cpp +++ b/src/atrac/at3p/at3p_tables.cpp @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "util.h" #include "at3p_tables.h" #include "ff/atrac3plus_data.h" @@ -71,7 +72,7 @@ constexpr uint32_t TScaleTable::BlocksPerBand[NumQMF + 1]; constexpr uint32_t TScaleTable::SpecsPerBlock[MaxBfus]; constexpr uint32_t TScaleTable::BlockSizeTab[MaxBfus + 1]; -static uint16_t __attribute__ ((noinline)) GenHuffmanEncTable(const uint8_t *cb, const uint8_t *xlat, uint16_t outLen, TVlcElement* const out) +static uint16_t atde_noinline GenHuffmanEncTable(const uint8_t *cb, const uint8_t *xlat, uint16_t outLen, TVlcElement* const out) { uint16_t index = 0; uint16_t code = 0; diff --git a/src/atrac/at3p/ff/atrac3plusdsp.c b/src/atrac/at3p/ff/atrac3plusdsp.c index 566f160..5859876 100644 --- a/src/atrac/at3p/ff/atrac3plusdsp.c +++ b/src/atrac/at3p/ff/atrac3plusdsp.c @@ -25,6 +25,7 @@ * DSP functions for ATRAC3+ decoder. */ +#define _USE_MATH_DEFINES #include <math.h> #include <string.h> diff --git a/src/lib/libgha b/src/lib/libgha -Subproject c90d2edd9c75dc2fa10e628b9e265ffe97f9a17 +Subproject 0c3e65863f31459c4be8a12051a8d6260cb1d30 @@ -33,6 +33,11 @@ #define ASSERT(x) assert(x) #endif +#if defined(_MSC_VER) +# define atde_noinline __declspec(noinline) +#else +# define atde_noinline __attribute__((noinline)) +#endif template<class T> inline void SwapArray(T* p, const size_t len) { |