diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index 90a0da2c1..f5840a284 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -214,7 +214,8 @@ static void *kInputNodeContext = &kInputNodeContext; // wait before exiting, as we might still get seeking request DLog("InputNode: Before wait") [exitAtTheEndOfTheStream waitIndefinitely]; - DLog("InputNode: After wait, should seek = %d", shouldSeek) if(shouldSeek) { + DLog("InputNode: After wait, should seek = %d", shouldSeek); + if(shouldSeek) { endOfStream = NO; shouldClose = NO; continue; diff --git a/ThirdParty/fdk-aac/README.md b/ThirdParty/fdk-aac/README.md index 66c79719d..9b4ae61b6 100644 --- a/ThirdParty/fdk-aac/README.md +++ b/ThirdParty/fdk-aac/README.md @@ -1,10 +1,6 @@ -This was built with my modified FDK-AAC from: +This package was built with version 2.0.2, with the included patches applied. -https://gitlab.com/kode54/fdk-aac.git - -Which was only slightly modified from upstream from here: - -https://github.com/mstorsjo/fdk-aac.git +https://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.2.tar.gz Using the following commandline: diff --git a/ThirdParty/fdk-aac/include/fdk-aac/aacdecoder_lib.h b/ThirdParty/fdk-aac/include/fdk-aac/aacdecoder_lib.h index e64ae70fd..06272df63 100644 --- a/ThirdParty/fdk-aac/include/fdk-aac/aacdecoder_lib.h +++ b/ThirdParty/fdk-aac/include/fdk-aac/aacdecoder_lib.h @@ -1037,7 +1037,7 @@ LINKSPEC_H AAC_DECODER_ERROR aacDecoder_Fill(HANDLE_AACDECODER self, * \param self AAC decoder handle. * \param pTimeData Pointer to external output buffer where the decoded PCM * samples will be stored into. - * \param timeDataSize Size of external output buffer in PCM samples. + * \param timeDataSize Size of external output buffer. * \param flags Bit field with flags for the decoder: \n * (flags & AACDEC_CONCEAL) == 1: Do concealment. \n * (flags & AACDEC_FLUSH) == 2: Discard input data. Flush diff --git a/ThirdParty/fdk-aac/include/fdk-aac/aacenc_lib.h b/ThirdParty/fdk-aac/include/fdk-aac/aacenc_lib.h index 159b711a1..e3211920a 100644 --- a/ThirdParty/fdk-aac/include/fdk-aac/aacenc_lib.h +++ b/ThirdParty/fdk-aac/include/fdk-aac/aacenc_lib.h @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2021 Fraunhofer-Gesellschaft zur Förderung der angewandten +© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -1647,7 +1647,7 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder, * * \return * - AACENC_OK, on succes. - * - AACENC_INVALID_HANDLE, AACENC_INIT_ERROR, on failure. + * - AACENC_INIT_ERROR, on failure. */ AACENC_ERROR aacEncInfo(const HANDLE_AACENCODER hAacEncoder, AACENC_InfoStruct *pInfo); diff --git a/ThirdParty/fdk-aac/patches/fdk_fixedpoint.patch b/ThirdParty/fdk-aac/patches/fdk_fixedpoint.patch new file mode 100644 index 000000000..d0217cfa8 --- /dev/null +++ b/ThirdParty/fdk-aac/patches/fdk_fixedpoint.patch @@ -0,0 +1,33 @@ +diff -ur fdk-aac-2.0.2/libAACdec/src/aacdecoder_lib.cpp fdk-aac-2.0.2.patched/libAACdec/src/aacdecoder_lib.cpp +--- fdk-aac-2.0.2/libAACdec/src/aacdecoder_lib.cpp 2021-04-28 05:45:10 ++++ fdk-aac-2.0.2.patched/libAACdec/src/aacdecoder_lib.cpp 2022-06-25 04:27:45 +@@ -1829,7 +1829,7 @@ + ErrorStatus = AAC_DEC_DECODE_FRAME_ERROR; + } + +- pcmLimiterScale += PCM_OUT_HEADROOM; ++ /* pcmLimiterScale += PCM_OUT_HEADROOM; */ /* Allow 8.24 output */ + + if (flags & AACDEC_CLRHIST) { + if (!(self->flags[0] & AC_USAC)) { +diff -ur fdk-aac-2.0.2/libSYS/include/machine_type.h fdk-aac-2.0.2.patched/libSYS/include/machine_type.h +--- fdk-aac-2.0.2/libSYS/include/machine_type.h 2021-04-28 05:45:11 ++++ fdk-aac-2.0.2.patched/libSYS/include/machine_type.h 2022-06-25 04:26:28 +@@ -223,11 +223,12 @@ + #define FDK_ASSERT(ignore) + #endif + +-typedef SHORT INT_PCM; +-#define MAXVAL_PCM MAXVAL_SGL +-#define MINVAL_PCM MINVAL_SGL +-#define WAV_BITS 16 +-#define SAMPLE_BITS 16 ++/* kode54 - changes to allow decoding fixed point directly */ ++typedef LONG INT_PCM; ++#define MAXVAL_PCM MAXVAL_DBL ++#define MINVAL_PCM MINVAL_DBL ++#define WAV_BITS 32 ++#define SAMPLE_BITS 32 + #define SAMPLE_MAX ((INT_PCM)(((ULONG)1 << (SAMPLE_BITS - 1)) - 1)) + #define SAMPLE_MIN (~SAMPLE_MAX) +