From 4d22b31b934658af46bab97e8d8e32760a667fe6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 22 Apr 2020 17:44:05 +0100 Subject: [PATCH] Update flake library to latest version. --- .gitmodules | 6 +- .idea/.idea.Aaru/.idea/contentModel.xml | 993 +++++++++++++++++++---- .idea/.idea.Aaru/.idea/vcs.xml | 3 +- Aaru.Compression/Aaru.Compression.csproj | 174 ---- Aaru.Images/Aaru.Images.csproj | 1 + Aaru.Images/AaruFormat/AaruFormat.cs | 7 +- Aaru.Images/AaruFormat/Read.cs | 4 +- Aaru.Images/AaruFormat/Write.cs | 8 +- Aaru.sln | 20 + build.sh | 0 cuetools.net | 1 + cuetoolsnet | 1 - 12 files changed, 868 insertions(+), 350 deletions(-) mode change 100755 => 100644 build.sh create mode 160000 cuetools.net delete mode 160000 cuetoolsnet diff --git a/.gitmodules b/.gitmodules index 9db4ce36f..54a9076e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "CICMMetadata"] path = CICMMetadata url = https://github.com/claunia/CICMMetadata -[submodule "cuetoolsnet"] - path = cuetoolsnet - url = https://github.com/claunia/cuetoolsnet.git [submodule "Aaru.Checksums"] path = Aaru.Checksums url = https://github.com/aaru-dps/Aaru.Checksums @@ -22,3 +19,6 @@ [submodule "Aaru.Helpers"] path = Aaru.Helpers url = https://github.com/aaru-dps/Aaru.Helpers +[submodule "cuetools.net"] + path = cuetools.net + url = https://github.com/gchudov/cuetools.net diff --git a/.idea/.idea.Aaru/.idea/contentModel.xml b/.idea/.idea.Aaru/.idea/contentModel.xml index 7b4a16c54..6765b65ac 100644 --- a/.idea/.idea.Aaru/.idea/contentModel.xml +++ b/.idea/.idea.Aaru/.idea/contentModel.xml @@ -4,25 +4,6 @@ - - - - - - - - - - - - - - - - - - - @@ -71,13 +52,6 @@ - - - - - - - @@ -85,12 +59,18 @@ + + + + + + @@ -99,14 +79,6 @@ - - - - - - - - @@ -114,11 +86,19 @@ + + + + + + + + @@ -177,6 +157,13 @@ + + + + + + + @@ -197,6 +184,7 @@ +<<<<<<< HEAD @@ -205,11 +193,12 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. - @@ -218,6 +207,7 @@ + @@ -235,6 +225,7 @@ + @@ -255,8 +246,8 @@ - + @@ -266,11 +257,11 @@ - + - + @@ -284,17 +275,17 @@ - - + + - + @@ -314,12 +305,19 @@ - + + + + + + + + @@ -336,6 +334,7 @@ +<<<<<<< HEAD @@ -344,60 +343,63 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + @@ -422,7 +424,6 @@ - @@ -434,11 +435,12 @@ + - + @@ -460,9 +462,9 @@ + - @@ -492,6 +494,13 @@ + + + + + + + @@ -555,11 +564,11 @@ + - @@ -579,6 +588,7 @@ +<<<<<<< HEAD @@ -587,9 +597,12 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. + @@ -646,6 +659,13 @@ + + + + + + + @@ -658,9 +678,10 @@ - + +<<<<<<< HEAD @@ -669,17 +690,16 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. + - - - - @@ -687,13 +707,16 @@ + + + - - + + @@ -729,11 +752,13 @@ + - + + @@ -741,11 +766,14 @@ - + + + + @@ -780,8 +808,8 @@ - + @@ -790,8 +818,8 @@ - + @@ -800,8 +828,8 @@ - + @@ -828,8 +856,15 @@ - + + + + + + + + @@ -847,11 +882,11 @@ - + @@ -874,6 +909,7 @@ +<<<<<<< HEAD @@ -886,22 +922,19 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. + - - - - - - @@ -909,7 +942,475 @@ + + + + + +<<<<<<< HEAD +======= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> b56058a0... Update flake library to latest version. @@ -917,6 +1418,7 @@ + @@ -924,10 +1426,6 @@ - - - - @@ -935,6 +1433,9 @@ + + + @@ -1017,16 +1518,7 @@ - - - - - - - - - - + @@ -1048,6 +1540,16 @@ + + + + + + + + + + @@ -1081,16 +1583,6 @@ - - - - - - - - - - @@ -1128,6 +1620,16 @@ + + + + + + + + + + @@ -1218,8 +1720,8 @@ - + @@ -1253,16 +1755,6 @@ - - - - - - - - - - @@ -1274,6 +1766,23 @@ + + + + + + + + + + + + + + + + + @@ -1456,16 +1965,6 @@ - - - - - - - - - - @@ -1476,6 +1975,16 @@ + + + + + + + + + + @@ -1494,6 +2003,7 @@ +<<<<<<< HEAD @@ -1502,6 +2012,8 @@ +======= +>>>>>>> b56058a0... Update flake library to latest version. @@ -1509,6 +2021,7 @@ + @@ -1516,6 +2029,13 @@ + + + + + + + @@ -1525,8 +2045,8 @@ - +<<<<<<< HEAD @@ -1535,10 +2055,12 @@ +======= + +>>>>>>> b56058a0... Update flake library to latest version. - @@ -1547,70 +2069,108 @@ + - - - - - - - - - - + + + + - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - + + + + + + + - - + + + + + + + + + + + + + @@ -1625,7 +2185,116 @@ +<<<<<<< HEAD +======= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> b56058a0... Update flake library to latest version. + + \ No newline at end of file diff --git a/.idea/.idea.Aaru/.idea/vcs.xml b/.idea/.idea.Aaru/.idea/vcs.xml index edd5dbb6a..bcdaa1d38 100644 --- a/.idea/.idea.Aaru/.idea/vcs.xml +++ b/.idea/.idea.Aaru/.idea/vcs.xml @@ -14,6 +14,7 @@ - + + \ No newline at end of file diff --git a/Aaru.Compression/Aaru.Compression.csproj b/Aaru.Compression/Aaru.Compression.csproj index 861bac359..bb3514ab7 100644 --- a/Aaru.Compression/Aaru.Compression.csproj +++ b/Aaru.Compression/Aaru.Compression.csproj @@ -53,184 +53,10 @@ - - CUETools.Codecs.FLAKE/ChannelMode.cs - - - CUETools.Codecs.FLAKE/FlacFrame.cs - - - CUETools.Codecs.FLAKE/FlacSubframe.cs - - - CUETools.Codecs.FLAKE/FlacSubframeInfo.cs - - - CUETools.Codecs.FLAKE/Flake.cs - - - CUETools.Codecs.FLAKE/FlakeReader.cs - - - CUETools.Codecs.FLAKE/FlakeWriter.cs - - - CUETools.Codecs.FLAKE/MetadataType.cs - - - CUETools.Codecs.FLAKE/OrderMethod.cs - - - CUETools.Codecs.FLAKE/PredictionType.cs - - - CUETools.Codecs.FLAKE/Properties/Resources.Designer.cs - - - CUETools.Codecs.FLAKE/RiceContext.cs - - - CUETools.Codecs.FLAKE/SeekPoint.cs - - - CUETools.Codecs.FLAKE/StereoMethod.cs - - - CUETools.Codecs.FLAKE/SubframeType.cs - - - CUETools.Codecs.FLAKE/WindowFunction.cs - - - CUETools.Codecs.FLAKE/WindowMethod.cs - - - CUETools.Codecs/AudioBuffer.cs - - - CUETools.Codecs/AudioDecoderClass.cs - - - CUETools.Codecs/AudioEncoderClass.cs - - - CUETools.Codecs/AudioEncoderSettings.cs - - - CUETools.Codecs/AudioPCMConfig.cs - - - CUETools.Codecs/AudioPipe.cs - - - CUETools.Codecs/AudioSamples.cs - - - CUETools.Codecs/BitReader.cs - - - CUETools.Codecs/BitWriter.cs - - - CUETools.Codecs/CRC/CRC16.cs - - - CUETools.Codecs/CRC/CRC16CCITT.cs - - - CUETools.Codecs/CRC/CRC32.cs - - - CUETools.Codecs/CRC/CRC8.cs - - - CUETools.Codecs/CUEToolsCodecsConfig.cs - - - CUETools.Codecs/CUEToolsFormat.cs - - - CUETools.Codecs/CUEToolsTagger.cs - - - CUETools.Codecs/CUEToolsUDC.cs - - - CUETools.Codecs/CUEToolsUDCList.cs - - - CUETools.Codecs/CyclicBuffer.cs - - - CUETools.Codecs/CyclicBufferInputStream.cs - - - CUETools.Codecs/CyclicBufferOutputStream.cs - - - CUETools.Codecs/DefaultValueForMode.cs - - - CUETools.Codecs/DummyWriter.cs - - - CUETools.Codecs/IAudioDest.cs - - - CUETools.Codecs/IAudioFilter.cs - - - CUETools.Codecs/IAudioSource.cs - - - CUETools.Codecs/IWavePlayer.cs - - - CUETools.Codecs/LPC.cs - - - CUETools.Codecs/LpcContext.cs - - - CUETools.Codecs/NullStream.cs - - - CUETools.Codecs/PlaybackState.cs - - - CUETools.Codecs/SilenceGenerator.cs - - - CUETools.Codecs/SRDescriptionAttribute.cs - - - CUETools.Codecs/UserDefinedEncoderSettings.cs - - - CUETools.Codecs/UserDefinedReader.cs - - - CUETools.Codecs/UserDefinedWriter.cs - - - CUETools.Codecs/WAVReader.cs - - - CUETools.Codecs/WAVWriter.cs - - - CUETools.Codecs/WAVWriterSettings.cs - - - CUETools.Codecs.FLAKE/Properties/Resources.resx - - - CUETools.Codecs.FLAKE/Properties/Resources.ru-RU.resx - LICENSE.LGPL diff --git a/Aaru.Images/Aaru.Images.csproj b/Aaru.Images/Aaru.Images.csproj index 17bf956d1..d38448202 100644 --- a/Aaru.Images/Aaru.Images.csproj +++ b/Aaru.Images/Aaru.Images.csproj @@ -536,6 +536,7 @@ {D571B8EF-903D-4353-BDD5-B834F9F029EF} Aaru.Filters + diff --git a/Aaru.Images/AaruFormat/AaruFormat.cs b/Aaru.Images/AaruFormat/AaruFormat.cs index b406161b3..c681dbd2b 100644 --- a/Aaru.Images/AaruFormat/AaruFormat.cs +++ b/Aaru.Images/AaruFormat/AaruFormat.cs @@ -76,7 +76,8 @@ using Aaru.Checksums; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; -using CUETools.Codecs.FLAKE; +using CUETools.Codecs; +using CUETools.Codecs.Flake; using SharpCompress.Compressors.LZMA; namespace Aaru.DiscImages @@ -108,9 +109,9 @@ namespace Aaru.DiscImages /// On-memory deduplication table indexed by checksum. Dictionary deduplicationTable; /// writer. - FlakeWriter flakeWriter; + AudioEncoder flakeWriter; /// settings. - FlakeWriterSettings flakeWriterSettings; + EncoderSettings flakeWriterSettings; /// Block with logical geometry. GeometryBlock geometryBlock; /// Image header. diff --git a/Aaru.Images/AaruFormat/Read.cs b/Aaru.Images/AaruFormat/Read.cs index e601802d2..e599ca1bb 100644 --- a/Aaru.Images/AaruFormat/Read.cs +++ b/Aaru.Images/AaruFormat/Read.cs @@ -46,7 +46,7 @@ using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Console; using CUETools.Codecs; -using CUETools.Codecs.FLAKE; +using CUETools.Codecs.Flake; using Schemas; using SharpCompress.Compressors.LZMA; using Marshal = Aaru.Helpers.Marshal; @@ -1190,7 +1190,7 @@ namespace Aaru.DiscImages byte[] flacBlock = new byte[blockHeader.cmpLength]; imageStream.Read(flacBlock, 0, flacBlock.Length); var flacMs = new MemoryStream(flacBlock); - var flakeReader = new FlakeReader("", flacMs); + var flakeReader = new AudioDecoder(new DecoderSettings(), "", flacMs); block = new byte[blockHeader.length]; int samples = (int)((block.Length / blockHeader.sectorSize) * 588); var audioBuffer = new AudioBuffer(AudioPCMConfig.RedBook, block, samples); diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index 0cdabd0d9..a9b688f29 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -47,7 +47,7 @@ using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Decoders; using CUETools.Codecs; -using CUETools.Codecs.FLAKE; +using CUETools.Codecs.Flake; using Schemas; using SharpCompress.Compressors.LZMA; using Marshal = Aaru.Helpers.Marshal; @@ -904,7 +904,7 @@ namespace Aaru.DiscImages // Initialize compressors properties (all maxed) lzmaEncoderProperties = new LzmaEncoderProperties(true, (int)dictionary, 273); - flakeWriterSettings = new FlakeWriterSettings + flakeWriterSettings = new EncoderSettings() { PCM = AudioPCMConfig.RedBook, DoMD5 = false, BlockSize = (1 << shift) * SAMPLES_PER_SECTOR, @@ -926,7 +926,7 @@ namespace Aaru.DiscImages if(flakeWriterSettings.BlockSize < MIN_FLAKE_BLOCK) flakeWriterSettings.BlockSize = MIN_FLAKE_BLOCK; - FlakeWriter.Vendor = "Aaru"; + AudioEncoder.Vendor = "Aaru"; IsWriting = true; ErrorMessage = null; @@ -1152,7 +1152,7 @@ namespace Aaru.DiscImages switch(currentBlockHeader.compression) { case CompressionType.Flac: - flakeWriter = new FlakeWriter("", blockStream, flakeWriterSettings) + flakeWriter = new AudioEncoder(flakeWriterSettings, "", blockStream) { DoSeekTable = false }; diff --git a/Aaru.sln b/Aaru.sln index 146a0bc44..a34caaa8e 100644 --- a/Aaru.sln +++ b/Aaru.sln @@ -35,6 +35,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Database", "Aaru.Datab EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Dto", "Aaru.Dto\Aaru.Dto.csproj", "{F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.FLAKE", "cuetools.net\CUETools.Codecs.FLAKE\CUETools.Codecs.FLAKE.csproj", "{A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs", "cuetools.net\CUETools.Codecs\CUETools.Codecs.csproj", "{D1F69B02-A6A4-4EF2-A916-815BACC18F71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -171,6 +175,22 @@ Global {F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Release|Any CPU.Build.0 = Release|Any CPU {F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Release|x86.ActiveCfg = Release|Any CPU {F4399FF5-9BD0-475A-9EA7-3DAE45291FE2}.Release|x86.Build.0 = Release|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Debug|x86.Build.0 = Debug|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Release|Any CPU.Build.0 = Release|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Release|x86.ActiveCfg = Release|Any CPU + {A6E2C380-F8CB-4873-8DA6-0BB027C48EBC}.Release|x86.Build.0 = Release|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Debug|x86.ActiveCfg = Debug|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Debug|x86.Build.0 = Debug|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Release|Any CPU.Build.0 = Release|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Release|x86.ActiveCfg = Release|Any CPU + {D1F69B02-A6A4-4EF2-A916-815BACC18F71}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build.sh b/build.sh old mode 100755 new mode 100644 diff --git a/cuetools.net b/cuetools.net new file mode 160000 index 000000000..124b532b9 --- /dev/null +++ b/cuetools.net @@ -0,0 +1 @@ +Subproject commit 124b532b9e84e133bdca6f5c01af1818591df690 diff --git a/cuetoolsnet b/cuetoolsnet deleted file mode 160000 index 42adab013..000000000 --- a/cuetoolsnet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 42adab0138833031c3b564ec002267da568d04b2