Skip to content

Commit

Permalink
Update MAC_SDK from 10.26 to 10.37
Browse files Browse the repository at this point in the history
- Original download location:
  https://monkeysaudio.com/files/MAC_1037_SDK.zip
  SHA256:
  c7b969e41706e70dd6a961839d1f46eb1afc398c7ee68dadcfd0b15c352ab5ad
- Update the CUETools specific MACLibDll.cpp based on the upstream
  modifications to MACDll.cpp [1].
- Update ThirdParty_MAC_SDK_CUETools.patch accordingly

[1] https://monkeysaudio.com/versionhistory.html
  • Loading branch information
c72578 committed Dec 22, 2023
1 parent 58cc39e commit 40d50c2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# yamllint disable-line rule:line-length
run: |
git apply --directory=ThirdParty/flac ThirdParty/submodule_flac_CUETools.patch --verbose --whitespace=nowarn
powershell -c "Expand-Archive ThirdParty/MAC_SDK/MAC_1026_SDK.zip -DestinationPath ThirdParty/MAC_SDK/"
powershell -c "Expand-Archive ThirdParty/MAC_SDK/MAC_1037_SDK.zip -DestinationPath ThirdParty/MAC_SDK/"
git apply --directory=ThirdParty/MAC_SDK ThirdParty/ThirdParty_MAC_SDK_CUETools.patch --verbose
git apply --directory=ThirdParty/taglib-sharp ThirdParty/submodule_taglib-sharp_CUETools.patch --verbose
git apply --directory=ThirdParty/WavPack ThirdParty/submodule_WavPack_CUETools.patch --verbose
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# yamllint disable-line rule:line-length
run: |
git apply --directory=ThirdParty/flac ThirdParty/submodule_flac_CUETools.patch --verbose --whitespace=nowarn
powershell -c "Expand-Archive ThirdParty/MAC_SDK/MAC_1026_SDK.zip -DestinationPath ThirdParty/MAC_SDK/"
powershell -c "Expand-Archive ThirdParty/MAC_SDK/MAC_1037_SDK.zip -DestinationPath ThirdParty/MAC_SDK/"
git apply --directory=ThirdParty/MAC_SDK ThirdParty/ThirdParty_MAC_SDK_CUETools.patch --verbose
git apply --directory=ThirdParty/taglib-sharp ThirdParty/submodule_taglib-sharp_CUETools.patch --verbose
git apply --directory=ThirdParty/WavPack ThirdParty/submodule_WavPack_CUETools.patch --verbose
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions ThirdParty/MAC_SDK/Source/MACLibDll/MACLibDll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,18 @@ void __stdcall c_APECompress_Destroy(APE_COMPRESS_HANDLE hAPECompress)
int __stdcall c_APECompress_Start(APE_COMPRESS_HANDLE hAPECompress, const char * pOutputFilename, const APE::WAVEFORMATEX * pwfeInput, APE::int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, APE::int64 nHeaderBytes)
{
CSmartPtr<wchar_t> spOutputFilename(CAPECharacterHelper::GetUTF16FromANSI(pOutputFilename), TRUE);
return (static_cast<IAPECompress *>(hAPECompress))->Start(spOutputFilename, pwfeInput, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
return (static_cast<IAPECompress *>(hAPECompress))->Start(spOutputFilename, pwfeInput, false, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
}

int __stdcall c_APECompress_StartW(APE_COMPRESS_HANDLE hAPECompress, const str_utfn * pOutputFilename, const APE::WAVEFORMATEX * pwfeInput, APE::int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, APE::int64 nHeaderBytes)
{
return (static_cast<IAPECompress *>(hAPECompress))->Start(pOutputFilename, pwfeInput, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
return (static_cast<IAPECompress *>(hAPECompress))->Start(pOutputFilename, pwfeInput, false, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
}
#endif

int __stdcall c_APECompress_StartEx(APE_COMPRESS_HANDLE hAPECompress, APE_CIO_HANDLE hCIO, const APE::WAVEFORMATEX * pwfeInput, APE::int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, APE::int64 nHeaderBytes)
{
return (static_cast<IAPECompress *>(hAPECompress))->StartEx((CallbackCIO *) hCIO, pwfeInput, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
return (static_cast<IAPECompress *>(hAPECompress))->StartEx((CallbackCIO *) hCIO, pwfeInput, false, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
}

APE::int64 __stdcall c_APECompress_AddData(APE_COMPRESS_HANDLE hAPECompress, unsigned char * pData, int nBytes)
Expand Down
74 changes: 37 additions & 37 deletions ThirdParty/ThirdParty_MAC_SDK_CUETools.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APECompress.cpp 1_MAC_1026_SDK_updated/Source/MACLib/APECompress.cpp
--- 0_MAC_1026_SDK_orig/Source/MACLib/APECompress.cpp 2023-05-17 19:49:22.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/APECompress.cpp 2023-11-01 09:49:24.000000000 +0100
@@ -33,6 +33,7 @@
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/APECompress.cpp 1_MAC_1037_SDK_updated/Source/MACLib/APECompress.cpp
--- 0_MAC_1037_SDK_orig/Source/MACLib/APECompress.cpp 2023-12-15 16:35:58.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/MACLib/APECompress.cpp 2023-12-22 04:00:18.000000000 +0100
@@ -34,6 +34,7 @@
}
}

+#ifndef EXCLUDE_CIO
int CAPECompress::Start(const wchar_t * pOutputFilename, const WAVEFORMATEX * pwfeInput, int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int64 nHeaderBytes, int nFlags)
int CAPECompress::Start(const wchar_t * pOutputFilename, const WAVEFORMATEX * pwfeInput, bool bFloat, int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int64 nHeaderBytes, int nFlags)
{
if (m_pioOutput)
@@ -58,6 +59,7 @@
@@ -67,6 +68,7 @@

return nStartResult;
}
+#endif

int CAPECompress::StartEx(CIO * pioOutput, const WAVEFORMATEX * pwfeInput, int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int64 nHeaderBytes)
int CAPECompress::StartEx(CIO * pioOutput, const WAVEFORMATEX * pwfeInput, bool bFloat, int64 nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int64 nHeaderBytes)
{
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APECompress.h 1_MAC_1026_SDK_updated/Source/MACLib/APECompress.h
--- 0_MAC_1026_SDK_orig/Source/MACLib/APECompress.h 2023-07-11 16:21:04.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/APECompress.h 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/APECompress.h 1_MAC_1037_SDK_updated/Source/MACLib/APECompress.h
--- 0_MAC_1037_SDK_orig/Source/MACLib/APECompress.h 2023-12-15 14:14:54.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/MACLib/APECompress.h 2023-12-22 04:02:34.000000000 +0100
@@ -20,7 +20,9 @@
~CAPECompress();

// start encoding
+#ifndef EXCLUDE_CIO
int Start(const wchar_t * pOutputFilename, const WAVEFORMATEX * pwfeInput, int64 nMaxAudioBytes, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL, const void * pHeaderData = APE_NULL, int64 nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION, int nFlags = 0) APE_OVERRIDE;
int Start(const wchar_t * pOutputFilename, const WAVEFORMATEX * pwfeInput, bool bFloat, int64 nMaxAudioBytes, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL, const void * pHeaderData = APE_NULL, int64 nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION, int nFlags = 0) APE_OVERRIDE;
+#endif
int StartEx(CIO * pioOutput, const WAVEFORMATEX * pwfeInput, int64 nMaxAudioBytes, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL, const void * pHeaderData = APE_NULL, int64 nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION) APE_OVERRIDE;
int StartEx(CIO * pioOutput, const WAVEFORMATEX * pwfeInput, bool bFloat, int64 nMaxAudioBytes, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL, const void * pHeaderData = APE_NULL, int64 nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION) APE_OVERRIDE;

// add data / compress data
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APEInfo.cpp 1_MAC_1026_SDK_updated/Source/MACLib/APEInfo.cpp
--- 0_MAC_1026_SDK_orig/Source/MACLib/APEInfo.cpp 2023-10-04 14:56:36.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/APEInfo.cpp 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/APEInfo.cpp 1_MAC_1037_SDK_updated/Source/MACLib/APEInfo.cpp
--- 0_MAC_1037_SDK_orig/Source/MACLib/APEInfo.cpp 2023-10-04 06:56:38.000000000 +0200
+++ 1_MAC_1037_SDK_updated/Source/MACLib/APEInfo.cpp 2023-12-22 03:51:40.000000000 +0100
@@ -46,6 +46,7 @@
{
}
Expand All @@ -49,9 +49,9 @@ diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APEInfo.cpp 1_MAC_1026_SDK_updated/So

CAPEInfo::CAPEInfo(int * pErrorCode, CIO * pIO, CAPETag * pTag)
{
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APETag.cpp 1_MAC_1026_SDK_updated/Source/MACLib/APETag.cpp
--- 0_MAC_1026_SDK_orig/Source/MACLib/APETag.cpp 2023-06-02 02:14:16.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/APETag.cpp 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/APETag.cpp 1_MAC_1037_SDK_updated/Source/MACLib/APETag.cpp
--- 0_MAC_1037_SDK_orig/Source/MACLib/APETag.cpp 2023-11-22 23:14:48.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/MACLib/APETag.cpp 2023-12-22 03:51:40.000000000 +0100
@@ -125,6 +125,7 @@
L"Crossover", L"Contemporary C", L"Christian Rock", L"Merengue", L"Salsa", L"Thrash Metal", L"Anime", L"JPop", L"SynthPop"
};
Expand All @@ -68,9 +68,9 @@ diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/APETag.cpp 1_MAC_1026_SDK_updated/Sou

CAPETag::CAPETag(CIO * pIO, bool bAnalyze, bool bCheckForID3v1)
{
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/MACLib.cpp 1_MAC_1026_SDK_updated/Source/MACLib/MACLib.cpp
--- 0_MAC_1026_SDK_orig/Source/MACLib/MACLib.cpp 2023-10-25 22:10:50.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/MACLib.cpp 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/MACLib.cpp 1_MAC_1037_SDK_updated/Source/MACLib/MACLib.cpp
--- 0_MAC_1037_SDK_orig/Source/MACLib/MACLib.cpp 2023-12-15 13:08:28.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/MACLib/MACLib.cpp 2023-12-22 03:51:40.000000000 +0100
@@ -77,6 +77,7 @@
return spAPEDecompress.GetPtr();
}
Expand All @@ -94,30 +94,30 @@ diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/MACLib.cpp 1_MAC_1026_SDK_updated/Sou
+#ifndef EXCLUDE_CIO
int __stdcall GetAPEFileType(const APE::str_utfn * pInputFilename, APE::str_ansi cFileType[8])
{
memset(&cFileType[0], 0, sizeof(APE::str_ansi) * 8);
@@ -887,3 +890,4 @@
memset(&cFileType[0], 0, sizeof(cFileType[0]) * 8);
@@ -888,3 +891,4 @@
// return
return nFunctionRetVal;
}
+#endif
diff -ur 0_MAC_1026_SDK_orig/Source/MACLib/MACLib.h 1_MAC_1026_SDK_updated/Source/MACLib/MACLib.h
--- 0_MAC_1026_SDK_orig/Source/MACLib/MACLib.h 2023-10-01 14:00:16.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/MACLib/MACLib.h 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/MACLib/MACLib.h 1_MAC_1037_SDK_updated/Source/MACLib/MACLib.h
--- 0_MAC_1037_SDK_orig/Source/MACLib/MACLib.h 2023-12-15 13:04:10.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/MACLib/MACLib.h 2023-12-22 03:58:14.000000000 +0100
@@ -382,9 +382,11 @@
// on decompression)
//////////////////////////////////////////////////////////////////////////////////////////////

+#ifndef EXCLUDE_CIO
virtual int Start(const str_utfn * pOutputFilename, const WAVEFORMATEX * pwfeInput,
int64 nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL,
bool bFloat, int64 nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL,
const void * pHeaderData = APE_NULL, int64 nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION, int nFlags = 0) = 0;
+#endif

virtual int StartEx(CIO * pioOutput, const WAVEFORMATEX * pwfeInput,
int64 nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL,
diff -ur 0_MAC_1026_SDK_orig/Source/Projects/VS2022/MACLib/MACLib.vcxproj 1_MAC_1026_SDK_updated/Source/Projects/VS2022/MACLib/MACLib.vcxproj
--- 0_MAC_1026_SDK_orig/Source/Projects/VS2022/MACLib/MACLib.vcxproj 2023-10-01 02:49:14.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/Projects/VS2022/MACLib/MACLib.vcxproj 2023-11-04 16:02:08.000000000 +0100
bool bFloat, int64 nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = APE_COMPRESSION_LEVEL_NORMAL,
diff -ur 0_MAC_1037_SDK_orig/Source/Projects/VS2022/MACLib/MACLib.vcxproj 1_MAC_1037_SDK_updated/Source/Projects/VS2022/MACLib/MACLib.vcxproj
--- 0_MAC_1037_SDK_orig/Source/Projects/VS2022/MACLib/MACLib.vcxproj 2023-12-16 15:38:46.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/Projects/VS2022/MACLib/MACLib.vcxproj 2023-12-22 03:51:40.000000000 +0100
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Expand Down Expand Up @@ -341,9 +341,9 @@ diff -ur 0_MAC_1026_SDK_orig/Source/Projects/VS2022/MACLib/MACLib.vcxproj 1_MAC_
<ClCompile Include="..\..\..\MACLib\NewPredictor.cpp" />
<ClCompile Include="..\..\..\MACLib\NNFilter.cpp" />
<ClCompile Include="..\..\..\Shared\BufferIO.cpp" />
diff -ur 0_MAC_1026_SDK_orig/Source/Shared/All.h 1_MAC_1026_SDK_updated/Source/Shared/All.h
--- 0_MAC_1026_SDK_orig/Source/Shared/All.h 2023-09-30 23:19:26.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/Shared/All.h 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/Shared/All.h 1_MAC_1037_SDK_updated/Source/Shared/All.h
--- 0_MAC_1037_SDK_orig/Source/Shared/All.h 2023-12-15 20:13:16.000000000 +0100
+++ 1_MAC_1037_SDK_updated/Source/Shared/All.h 2023-12-22 03:51:40.000000000 +0100
@@ -61,7 +61,21 @@
#ifdef _MSC_VER
#pragma warning(push) // push and pop warnings because the windows includes suppresses some like 4514
Expand Down Expand Up @@ -379,9 +379,9 @@ diff -ur 0_MAC_1026_SDK_orig/Source/Shared/All.h 1_MAC_1026_SDK_updated/Source/S
#define APE_ODS OutputDebugString
#define TICK_COUNT_TYPE unsigned long long
#if _WIN32_WINNT >= 0x600
diff -ur 0_MAC_1026_SDK_orig/Source/Shared/GlobalFunctions.cpp 1_MAC_1026_SDK_updated/Source/Shared/GlobalFunctions.cpp
--- 0_MAC_1026_SDK_orig/Source/Shared/GlobalFunctions.cpp 2023-05-23 14:52:16.000000000 +0200
+++ 1_MAC_1026_SDK_updated/Source/Shared/GlobalFunctions.cpp 2023-11-01 09:49:24.000000000 +0100
diff -ur 0_MAC_1037_SDK_orig/Source/Shared/GlobalFunctions.cpp 1_MAC_1037_SDK_updated/Source/Shared/GlobalFunctions.cpp
--- 0_MAC_1037_SDK_orig/Source/Shared/GlobalFunctions.cpp 2023-05-23 06:52:18.000000000 +0200
+++ 1_MAC_1037_SDK_updated/Source/Shared/GlobalFunctions.cpp 2023-12-22 03:51:40.000000000 +0100
@@ -44,6 +44,7 @@
return nResult;
}
Expand Down

0 comments on commit 40d50c2

Please sign in to comment.