From c815a90eb5810d8ba9a917ede08f94a7ce92b712 Mon Sep 17 00:00:00 2001 From: chudov Date: Mon, 8 Feb 2010 01:29:31 +0000 Subject: [PATCH] reorganizing a bit --- ArCueDotNet/ArCueDotNet.csproj | 44 -- ArCueDotNet/Properties/AssemblyInfo.cs | 8 +- Bwg.Hardware/Bwg.Hardware.csproj | 50 +- Bwg.Logging/Bwg.Logging.csproj | 54 +-- Bwg.Scsi/Bwg.Scsi.csproj | 58 +-- CUEControls/Properties/AssemblyInfo.cs | 8 +- CUERipper/CUERipper.csproj | 49 +- CUERipper/app.config | 5 + CUERipper/frmCUERipper.cs | 3 +- .../CUETools.AccurateRip.csproj | 48 -- .../Properties/AssemblyInfo.cs | 8 +- CUETools.CDImage/CUETools.CDImage.csproj | 44 -- CUETools.CDImage/Properties/AssemblyInfo.cs | 8 +- CUETools.Codecs.ALAC/ALACWriter.cs | 16 +- .../CUETools.Codecs.ALAC.csproj | 49 +- .../Properties/AssemblyInfo.cs | 12 +- .../CUETools.Codecs.FLAKE.csproj | 1 + CUETools.Codecs.FLAKE/FlakeWriter.cs | 16 +- .../Properties/AssemblyInfo.cs | 8 +- .../CUETools.Codecs.LossyWAV.csproj | 48 -- CUETools.Codecs/CUETools.Codecs.csproj | 48 -- CUETools.Codecs/Codecs.cs | 5 + CUETools.Codecs/Properties/AssemblyInfo.cs | 12 +- .../CUETools.Compression.Zip.csproj | 59 +++ .../ICSharpCode.SharpZipLib.dll | Bin .../Properties/AssemblyInfo.cs | 35 ++ .../SeekableZipStream.cs | 55 +-- .../ZipCompressionProvider.cs | 61 +++ .../CUETools.Compression.csproj | 47 ++ CUETools.Compression/Compression.cs | 50 ++ .../Properties/AssemblyInfo.cs | 35 ++ CUETools.Converter/CUETools.Converter.csproj | 44 -- .../CUETools.Codecs.FlaCuda.csproj | 4 +- CUETools.FlaCuda/FlaCudaWriter.cs | 26 +- CUETools.FlaCuda/Properties/AssemblyInfo.cs | 12 +- CUETools.FlaCudaExe/App.config | 8 + CUETools.FlaCudaExe/CUETools.FlaCuda.csproj | 6 + .../Properties/AssemblyInfo.cs | 8 +- CUETools.Flake/CUETools.Flake.csproj | 22 - CUETools.Processor/AudioReadWrite.cs | 22 +- CUETools.Processor/CUETools.Processor.csproj | 73 +-- CUETools.Processor/Processor.cs | 442 ++++++++---------- CUETools.Processor/Properties/AssemblyInfo.cs | 10 +- .../CUETools.ConsoleRipper.csproj | 49 +- CUETools.Ripper.Console/Program.cs | 9 +- .../CUETools.Ripper.SCSI.csproj | 57 +-- .../Properties/AssemblyInfo.cs | 6 +- CUETools.Ripper.SCSI/SCSIDrive.cs | 31 +- CUETools.Ripper/CUETools.Ripper.csproj | 57 +++ CUETools.Ripper/Properties/AssemblyInfo.cs | 35 ++ CUETools.Ripper/Ripper.cs | 43 ++ CUETools/CUETools.csproj | 46 +- CUETools/CUETools.sln | 108 +++-- CUETools/Properties/AssemblyInfo.cs | 6 +- CUETools/frmBatch.cs | 7 +- CUETools/frmCUETools.cs | 9 +- Freedb/Freedb.csproj | 25 - ...Net.csproj => CUETools.Codecs.HDCD.csproj} | 1 + HDCDDotNet/HDCDDotNet.cs | 88 +++- LossyWAVSharp/LossyWAVSharp.csproj | 44 -- UnRarDotNet/CUETools.Compression.Rar.csproj | 56 +++ UnRarDotNet/Properties/AssemblyInfo.cs | 8 +- UnRarDotNet/RarCompressionProvider.cs | 57 +++ UnRarDotNet/RarStream.cs | 7 +- UnRarDotNet/UnRarDotNet.csproj | 92 ---- UnRarDotNet/Unrar.cs | 35 +- 66 files changed, 1101 insertions(+), 1396 deletions(-) create mode 100644 CUETools.Compression.Zip/CUETools.Compression.Zip.csproj rename {CUETools.Processor => CUETools.Compression.Zip}/ICSharpCode.SharpZipLib.dll (100%) create mode 100644 CUETools.Compression.Zip/Properties/AssemblyInfo.cs rename {CUETools.Processor => CUETools.Compression.Zip}/SeekableZipStream.cs (62%) create mode 100644 CUETools.Compression.Zip/ZipCompressionProvider.cs create mode 100644 CUETools.Compression/CUETools.Compression.csproj create mode 100644 CUETools.Compression/Compression.cs create mode 100644 CUETools.Compression/Properties/AssemblyInfo.cs create mode 100644 CUETools.FlaCudaExe/App.config create mode 100644 CUETools.Ripper/CUETools.Ripper.csproj create mode 100644 CUETools.Ripper/Properties/AssemblyInfo.cs create mode 100644 CUETools.Ripper/Ripper.cs rename HDCDDotNet/{HDCDDotNet.csproj => CUETools.Codecs.HDCD.csproj} (97%) create mode 100644 UnRarDotNet/CUETools.Compression.Rar.csproj create mode 100644 UnRarDotNet/RarCompressionProvider.cs delete mode 100644 UnRarDotNet/UnRarDotNet.csproj diff --git a/ArCueDotNet/ArCueDotNet.csproj b/ArCueDotNet/ArCueDotNet.csproj index 4c2df87..05e212c 100644 --- a/ArCueDotNet/ArCueDotNet.csproj +++ b/ArCueDotNet/ArCueDotNet.csproj @@ -27,50 +27,6 @@ prompt 4 - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - diff --git a/ArCueDotNet/Properties/AssemblyInfo.cs b/ArCueDotNet/Properties/AssemblyInfo.cs index 6cbc360..0784c2d 100644 --- a/ArCueDotNet/Properties/AssemblyInfo.cs +++ b/ArCueDotNet/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("ArCueDotNet")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ArCueDotNet")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2008")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/Bwg.Hardware/Bwg.Hardware.csproj b/Bwg.Hardware/Bwg.Hardware.csproj index 281a43f..cf9bcbe 100644 --- a/Bwg.Hardware/Bwg.Hardware.csproj +++ b/Bwg.Hardware/Bwg.Hardware.csproj @@ -38,59 +38,11 @@ pdbonly true - ..\bin\any\Release\ + ..\bin\any\Release\plugins\ TRACE prompt 4 - - true - bin\x64\Debug\ - DEBUG;TRACE - bin\Debug\Bwg.Hardware.XML - false - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - bin\x86\Debug\ - DEBUG;TRACE - bin\Debug\Bwg.Hardware.XML - true - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - diff --git a/Bwg.Logging/Bwg.Logging.csproj b/Bwg.Logging/Bwg.Logging.csproj index db344b4..9ebf668 100644 --- a/Bwg.Logging/Bwg.Logging.csproj +++ b/Bwg.Logging/Bwg.Logging.csproj @@ -38,61 +38,11 @@ pdbonly true - ..\bin\any\Release\ + ..\bin\any\Release\plugins\ TRACE prompt 4 - ..\bin\any\Release\\Bwg.Logging.XML - - - true - bin\x64\Debug\ - DEBUG;TRACE - bin\Debug\Bwg.Logging.XML - false - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x64\Release\ - TRACE - bin\Release\Bwg.Logging.XML - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - bin\x86\Debug\ - DEBUG;TRACE - bin\Debug\Bwg.Logging.XML - true - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x86\Release\ - TRACE - bin\Release\Bwg.Logging.XML - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt + ..\bin\any\Release\plugins\Bwg.Logging.XML diff --git a/Bwg.Scsi/Bwg.Scsi.csproj b/Bwg.Scsi/Bwg.Scsi.csproj index 19f690e..0e4e899 100644 --- a/Bwg.Scsi/Bwg.Scsi.csproj +++ b/Bwg.Scsi/Bwg.Scsi.csproj @@ -39,66 +39,12 @@ pdbonly true - ..\bin\any\Release\ + ..\bin\any\Release\plugins\ TRACE prompt 4 true - ..\bin\any\Release\Bwg.Scsi.XML - - - true - bin\x64\Debug\ - DEBUG;TRACE - true - bin\Debug\Bwg.Scsi.XML - false - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x64\Release\ - TRACE - true - bin\Release\Bwg.Scsi.XML - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - bin\x86\Debug\ - DEBUG;TRACE - true - bin\Debug\Bwg.Scsi.XML - true - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - bin\x86\Release\ - TRACE - true - bin\Release\Bwg.Scsi.XML - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt + ..\bin\any\Release\plugins\Bwg.Scsi.XML diff --git a/CUEControls/Properties/AssemblyInfo.cs b/CUEControls/Properties/AssemblyInfo.cs index 72578c2..03ec260 100644 --- a/CUEControls/Properties/AssemblyInfo.cs +++ b/CUEControls/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("CUEControls")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CUEControls")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUERipper/CUERipper.csproj b/CUERipper/CUERipper.csproj index d6988f0..955ee87 100644 --- a/CUERipper/CUERipper.csproj +++ b/CUERipper/CUERipper.csproj @@ -27,50 +27,6 @@ prompt 4 - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - @@ -139,6 +95,11 @@ {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A} CUETools.Ripper.SCSI + False + + + {D2700165-3E77-4B28-928D-551F5FC11954} + CUETools.Ripper {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4} diff --git a/CUERipper/app.config b/CUERipper/app.config index 1246c46..1c41d78 100644 --- a/CUERipper/app.config +++ b/CUERipper/app.config @@ -12,4 +12,9 @@ + + + + + \ No newline at end of file diff --git a/CUERipper/frmCUERipper.cs b/CUERipper/frmCUERipper.cs index 9546e73..c5bbcd8 100644 --- a/CUERipper/frmCUERipper.cs +++ b/CUERipper/frmCUERipper.cs @@ -13,6 +13,7 @@ using CUETools.AccurateRip; using CUETools.CDImage; using CUETools.Codecs; using CUETools.Processor; +using CUETools.Ripper; using CUETools.Ripper.SCSI; using MusicBrainz; using Freedb; @@ -346,7 +347,7 @@ namespace CUERipper General.SetCUELine(r.cueSheet.Attributes, "REM", "GENRE", "", true); General.SetCUELine(r.cueSheet.Attributes, "REM", "DATE", "", false); General.SetCUELine(r.cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false); - General.SetCUELine(r.cueSheet.Attributes, "REM", "COMMENT", _config.createEACLOG ? "ExactAudioCopy v0.99pb4" : CDDriveReader.RipperVersion(), true); + General.SetCUELine(r.cueSheet.Attributes, "REM", "COMMENT", _config.createEACLOG ? "ExactAudioCopy v0.99pb4" : audioSource.RipperVersion, true); if (release != null) { r.cueSheet.FillFromMusicBrainz(release); diff --git a/CUETools.AccurateRip/CUETools.AccurateRip.csproj b/CUETools.AccurateRip/CUETools.AccurateRip.csproj index 7deb6ce..422fc2c 100644 --- a/CUETools.AccurateRip/CUETools.AccurateRip.csproj +++ b/CUETools.AccurateRip/CUETools.AccurateRip.csproj @@ -29,54 +29,6 @@ 4 true - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - diff --git a/CUETools.AccurateRip/Properties/AssemblyInfo.cs b/CUETools.AccurateRip/Properties/AssemblyInfo.cs index 76947c6..4274380 100644 --- a/CUETools.AccurateRip/Properties/AssemblyInfo.cs +++ b/CUETools.AccurateRip/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("CUETools.AccurateRip")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CUETools.AccurateRip")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2008")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.CDImage/CUETools.CDImage.csproj b/CUETools.CDImage/CUETools.CDImage.csproj index 422eb03..144ff8c 100644 --- a/CUETools.CDImage/CUETools.CDImage.csproj +++ b/CUETools.CDImage/CUETools.CDImage.csproj @@ -27,50 +27,6 @@ prompt 4 - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - diff --git a/CUETools.CDImage/Properties/AssemblyInfo.cs b/CUETools.CDImage/Properties/AssemblyInfo.cs index 9233644..07c6c27 100644 --- a/CUETools.CDImage/Properties/AssemblyInfo.cs +++ b/CUETools.CDImage/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("CUETools.CDImage")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CUETools.CDImage")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2008")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Codecs.ALAC/ALACWriter.cs b/CUETools.Codecs.ALAC/ALACWriter.cs index 4b41fa2..1d57c21 100644 --- a/CUETools.Codecs.ALAC/ALACWriter.cs +++ b/CUETools.Codecs.ALAC/ALACWriter.cs @@ -159,7 +159,21 @@ namespace CUETools.Codecs.ALAC set { if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + string[] args = value.Split(); + for (int i = 0; i < args.Length; i++) + { + if (args[i] == "--padding-length" && (++i) < args.Length) + { + PaddingLength = int.Parse(args[i]); + continue; + } + if (args[i] == "--verify") + { + DoVerify = true; + continue; + } + throw new Exception("Unsupported options " + value); + } } } diff --git a/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj b/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj index 3e1fdc4..0803586 100644 --- a/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj +++ b/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj @@ -29,54 +29,6 @@ 4 true - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - @@ -92,6 +44,7 @@ {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + False diff --git a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs index 81c3221..2a267ef 100644 --- a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("ALACDotNet")] +[assembly: AssemblyTitle("CUETools.Codecs.ALAC")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("ALACDotNet")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2008")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Codecs.ALAC")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj index 3a049e9..ae08b7d 100644 --- a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj +++ b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj @@ -44,6 +44,7 @@ {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + False diff --git a/CUETools.Codecs.FLAKE/FlakeWriter.cs b/CUETools.Codecs.FLAKE/FlakeWriter.cs index 6e025ff..db60b46 100644 --- a/CUETools.Codecs.FLAKE/FlakeWriter.cs +++ b/CUETools.Codecs.FLAKE/FlakeWriter.cs @@ -179,7 +179,21 @@ namespace CUETools.Codecs.FLAKE set { if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + string[] args = value.Split(); + for (int i = 0; i < args.Length; i++) + { + if (args[i] == "--padding-length" && (++i) < args.Length) + { + PaddingLength = int.Parse(args[i]); + continue; + } + if (args[i] == "--verify") + { + DoVerify = true; + continue; + } + throw new Exception("Unsupported options " + value); + } } } diff --git a/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs b/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs index ca83661..d884831 100644 --- a/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("CUETools.Codecs.FLAKE")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CUETools.Codecs.FLAKE")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj b/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj index fab3417..4787175 100644 --- a/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj +++ b/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj @@ -29,54 +29,6 @@ 4 true - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - true - ..\bin\Win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\Win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - diff --git a/CUETools.Codecs/CUETools.Codecs.csproj b/CUETools.Codecs/CUETools.Codecs.csproj index 8610bc6..f369581 100644 --- a/CUETools.Codecs/CUETools.Codecs.csproj +++ b/CUETools.Codecs/CUETools.Codecs.csproj @@ -29,54 +29,6 @@ 4 true - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - true - diff --git a/CUETools.Codecs/Codecs.cs b/CUETools.Codecs/Codecs.cs index 68768b3..a56a19f 100644 --- a/CUETools.Codecs/Codecs.cs +++ b/CUETools.Codecs/Codecs.cs @@ -54,6 +54,11 @@ namespace CUETools.Codecs long BlockSize { set; } } + public interface IAudioFilter + { + IAudioDest AudioDest { set; } + } + /// /// This class provides an attribute for marking /// classes that provide . diff --git a/CUETools.Codecs/Properties/AssemblyInfo.cs b/CUETools.Codecs/Properties/AssemblyInfo.cs index a4d3f2d..b30d89e 100644 --- a/CUETools.Codecs/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("AudioCodecsDotNet")] +[assembly: AssemblyTitle("CUETools.Codecs")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("AudioCodecsDotNet")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2008")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Codecs")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Compression.Zip/CUETools.Compression.Zip.csproj b/CUETools.Compression.Zip/CUETools.Compression.Zip.csproj new file mode 100644 index 0000000..f6d5f7b --- /dev/null +++ b/CUETools.Compression.Zip/CUETools.Compression.Zip.csproj @@ -0,0 +1,59 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5} + Library + Properties + CUETools.Compression.Zip + CUETools.Compression.Zip + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\any\Release\plugins\ + TRACE + prompt + 4 + + + + False + .\ICSharpCode.SharpZipLib.dll + + + + + + + + + + + + + {14EE067E-C218-4625-9540-2361AB27C4A6} + CUETools.Compression + False + + + + + \ No newline at end of file diff --git a/CUETools.Processor/ICSharpCode.SharpZipLib.dll b/CUETools.Compression.Zip/ICSharpCode.SharpZipLib.dll similarity index 100% rename from CUETools.Processor/ICSharpCode.SharpZipLib.dll rename to CUETools.Compression.Zip/ICSharpCode.SharpZipLib.dll diff --git a/CUETools.Compression.Zip/Properties/AssemblyInfo.cs b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5727ecb --- /dev/null +++ b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUETools.Compression.Zip")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Compression.Zip")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b87d1314-eb07-40b9-91da-2faf262a7b98")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Processor/SeekableZipStream.cs b/CUETools.Compression.Zip/SeekableZipStream.cs similarity index 62% rename from CUETools.Processor/SeekableZipStream.cs rename to CUETools.Compression.Zip/SeekableZipStream.cs index 4346ff9..7936416 100644 --- a/CUETools.Processor/SeekableZipStream.cs +++ b/CUETools.Compression.Zip/SeekableZipStream.cs @@ -1,22 +1,11 @@ using System; using System.IO; +using System.Collections.Generic; +using CUETools.Compression; using ICSharpCode.SharpZipLib.Zip; -namespace CUETools.Processor +namespace CUETools.Compression.Zip { - #region Event Delegate Definitions - - /// - /// Represents the method that will handle extraction progress events - /// - public delegate void ZipExtractionProgressHandler(object sender, ZipExtractionProgressEventArgs e); - /// - /// Represents the method that will handle password required events - /// - public delegate void ZipPasswordRequiredHandler(object sender, ZipPasswordRequiredEventArgs e); - - #endregion - public class SeekableZipStream : Stream { ZipFile zipFile; @@ -25,12 +14,10 @@ namespace CUETools.Processor long position; byte[] temp; - public SeekableZipStream(string path, string fileName) + public SeekableZipStream(ZipFile file, ZipEntry entry) { - zipFile = new ZipFile(path); - zipEntry = zipFile.GetEntry(fileName); - if (zipEntry == null) - throw new Exception("Archive entry not found."); + zipFile = file; + zipEntry = entry; zipStream = zipFile.GetInputStream(zipEntry); temp = new byte[65536]; position = 0; @@ -67,9 +54,8 @@ namespace CUETools.Processor public override void Close() { - zipStream.Close(); zipEntry = null; - zipFile.Close(); + zipStream.Close(); } public override void Flush() @@ -86,7 +72,7 @@ namespace CUETools.Processor { if (position == 0 && zipEntry.IsCrypted && ((ZipInputStream)zipStream).Password == null && PasswordRequired != null) { - ZipPasswordRequiredEventArgs e = new ZipPasswordRequiredEventArgs(); + CompressionPasswordRequiredEventArgs e = new CompressionPasswordRequiredEventArgs(); PasswordRequired(this, e); if (e.ContinueOperation && e.Password.Length > 0) ((ZipInputStream)zipStream).Password = e.Password; @@ -96,7 +82,7 @@ namespace CUETools.Processor position += total; if (ExtractionProgress != null) { - ZipExtractionProgressEventArgs e = new ZipExtractionProgressEventArgs(); + CompressionExtractionProgressEventArgs e = new CompressionExtractionProgressEventArgs(); e.BytesExtracted = position; e.FileName = zipEntry.Name; e.FileSize = zipEntry.Size; @@ -142,26 +128,7 @@ namespace CUETools.Processor throw new NotSupportedException(); } - public event ZipPasswordRequiredHandler PasswordRequired; - public event ZipExtractionProgressHandler ExtractionProgress; + public event EventHandler PasswordRequired; + public event EventHandler ExtractionProgress; } - - #region Event Argument Classes - - public class ZipPasswordRequiredEventArgs - { - public string Password = string.Empty; - public bool ContinueOperation = true; - } - - public class ZipExtractionProgressEventArgs - { - public string FileName; - public long FileSize; - public long BytesExtracted; - public double PercentComplete; - public bool ContinueOperation = true; - } - - #endregion } diff --git a/CUETools.Compression.Zip/ZipCompressionProvider.cs b/CUETools.Compression.Zip/ZipCompressionProvider.cs new file mode 100644 index 0000000..123e3a6 --- /dev/null +++ b/CUETools.Compression.Zip/ZipCompressionProvider.cs @@ -0,0 +1,61 @@ +using System; +using System.IO; +using System.Collections.Generic; +using CUETools.Compression; +using ICSharpCode.SharpZipLib.Zip; + +namespace CUETools.Compression.Zip +{ + [CompressionProviderClass("zip")] + public class ZipCompressionProvider : ICompressionProvider + { + private ZipFile _zipFile; + + public ZipCompressionProvider(string path) + { + _zipFile = new ZipFile(path); + } + + public void Close() + { + if (_zipFile != null) _zipFile.Close(); + _zipFile = null; + } + + ~ZipCompressionProvider() + { + Close(); + } + + public Stream Decompress(string file) + { + ZipEntry zipEntry = _zipFile.GetEntry(file); + if (zipEntry == null) + throw new Exception("Archive entry not found."); + //if (zipEntry.IsCrypted && PasswordRequired != null) + //{ + // CompressionPasswordRequiredEventArgs e = new CompressionPasswordRequiredEventArgs(); + // PasswordRequired(this, e); + // if (e.ContinueOperation && e.Password.Length > 0) + // _zipFile.Password = e.Password; + //} + SeekableZipStream stream = new SeekableZipStream(_zipFile, zipEntry); + stream.PasswordRequired += PasswordRequired; + stream.ExtractionProgress += ExtractionProgress; + return stream; + } + + public IEnumerable Contents + { + get + { + foreach (ZipEntry e in _zipFile) + if (e.IsFile) + yield return (e.Name); + } + } + + public event EventHandler PasswordRequired; + public event EventHandler ExtractionProgress; + } +} diff --git a/CUETools.Compression/CUETools.Compression.csproj b/CUETools.Compression/CUETools.Compression.csproj new file mode 100644 index 0000000..71e1ebc --- /dev/null +++ b/CUETools.Compression/CUETools.Compression.csproj @@ -0,0 +1,47 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {14EE067E-C218-4625-9540-2361AB27C4A6} + Library + Properties + CUETools.Compression + CUETools.Compression + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\any\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + \ No newline at end of file diff --git a/CUETools.Compression/Compression.cs b/CUETools.Compression/Compression.cs new file mode 100644 index 0000000..48147eb --- /dev/null +++ b/CUETools.Compression/Compression.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace CUETools.Compression +{ + public interface ICompressionProvider + { + Stream Decompress(string file); + void Close(); + IEnumerable Contents { get; } + + event EventHandler PasswordRequired; + event EventHandler ExtractionProgress; + } + + #region Event Argument Classes + public class CompressionPasswordRequiredEventArgs : EventArgs + { + public string Password = string.Empty; + public bool ContinueOperation = true; + } + + public class CompressionExtractionProgressEventArgs : EventArgs + { + public string FileName; + public long FileSize; + public long BytesExtracted; + public double PercentComplete; + public bool ContinueOperation = true; + } + #endregion + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public sealed class CompressionProviderClass : Attribute + { + private string _extension; + + public CompressionProviderClass(string extension) + { + _extension = extension; + } + + public string Extension + { + get { return _extension; } + } + } +} diff --git a/CUETools.Compression/Properties/AssemblyInfo.cs b/CUETools.Compression/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d878c03 --- /dev/null +++ b/CUETools.Compression/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUETools.Compression")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Compression")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0f1313dd-e60a-4295-9312-263a342355b1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Converter/CUETools.Converter.csproj b/CUETools.Converter/CUETools.Converter.csproj index d784726..1f32def 100644 --- a/CUETools.Converter/CUETools.Converter.csproj +++ b/CUETools.Converter/CUETools.Converter.csproj @@ -27,50 +27,6 @@ prompt 4 - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - diff --git a/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj b/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj index 1dbe623..e623d19 100644 --- a/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj +++ b/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj @@ -23,7 +23,7 @@ pdbonly true - ..\bin\any\Release\ + ..\bin\any\Release\plugins\ TRACE prompt 4 @@ -46,10 +46,12 @@ {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} CUETools.Codecs.FLAKE + False {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + False diff --git a/CUETools.FlaCuda/FlaCudaWriter.cs b/CUETools.FlaCuda/FlaCudaWriter.cs index a45975a..b3e0ec8 100644 --- a/CUETools.FlaCuda/FlaCudaWriter.cs +++ b/CUETools.FlaCuda/FlaCudaWriter.cs @@ -181,7 +181,31 @@ namespace CUETools.Codecs.FlaCuda set { if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + string[] args = value.Split(); + for (int i = 0; i < args.Length; i++) + { + if (args[i] == "--padding-length" && (++i) < args.Length) + { + PaddingLength = int.Parse(args[i]); + continue; + } + if (args[i] == "--verify") + { + DoVerify = true; + continue; + } + if (args[i] == "--cpu-threads" && (++i) < args.Length) + { + CPUThreads = int.Parse(args[i]); + continue; + } + if (args[i] == "--gpu-only") + { + GPUOnly = true; + continue; + } + throw new Exception("Unsupported options " + value); + } } } diff --git a/CUETools.FlaCuda/Properties/AssemblyInfo.cs b/CUETools.FlaCuda/Properties/AssemblyInfo.cs index da44f74..1fde694 100644 --- a/CUETools.FlaCuda/Properties/AssemblyInfo.cs +++ b/CUETools.FlaCuda/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("CUETools.FlaCuda")] +[assembly: AssemblyTitle("CUETools.Codecs.FlaCuda")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CUETools.FlaCuda")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Codecs.FlaCuda")] +[assembly: AssemblyCopyright("Copyright © 2009-2010 Gregory S. Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.FlaCudaExe/App.config b/CUETools.FlaCudaExe/App.config new file mode 100644 index 0000000..c8d467d --- /dev/null +++ b/CUETools.FlaCudaExe/App.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj b/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj index f093ddd..8f6cf71 100644 --- a/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj +++ b/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj @@ -40,16 +40,22 @@ {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} CUETools.Codecs.FLAKE + False {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + False {DFE50673-906C-4B8F-993B-A24CAD1CA17D} CUETools.Codecs.FlaCuda + False + + + + \ No newline at end of file diff --git a/CUETools.Ripper/Properties/AssemblyInfo.cs b/CUETools.Ripper/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..113510b --- /dev/null +++ b/CUETools.Ripper/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUETools.Ripper")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CUETools.Ripper")] +[assembly: AssemblyCopyright("Copyright © 2008-2010 Gregory S. Chudov")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a29f19a7-fa39-428b-836f-838d6f99c5b3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools.Ripper/Ripper.cs b/CUETools.Ripper/Ripper.cs new file mode 100644 index 0000000..d90c41a --- /dev/null +++ b/CUETools.Ripper/Ripper.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using CUETools.CDImage; +using CUETools.Codecs; +using System.Text; + +namespace CUETools.Ripper +{ + public interface ICDRipper : IAudioSource, IDisposable + { + bool Open(char Drive); + CDImageLayout TOC { get; } + string ARName { get; } + string EACName { get; } + int DriveOffset { get; set; } + string RipperVersion { get; } + string CurrentReadCommand { get; } + int CorrectionQuality { get; set; } + BitArray Errors { get; } + + event EventHandler ReadProgress; + } + + public sealed class ReadProgressArgs : EventArgs + { + public int Position; + public int Pass; + public int PassStart, PassEnd; + public int ErrorsCount; + public DateTime PassTime; + + public ReadProgressArgs(int position, int pass, int passStart, int passEnd, int errorsCount, DateTime passTime) + { + Position = position; + Pass = pass; + PassStart = passStart; + PassEnd = passEnd; + ErrorsCount = errorsCount; + PassTime = passTime; + } + } +} diff --git a/CUETools/CUETools.csproj b/CUETools/CUETools.csproj index b0270ef..f3cf3d8 100644 --- a/CUETools/CUETools.csproj +++ b/CUETools/CUETools.csproj @@ -56,49 +56,7 @@ true AnyCPU - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - true - full - x86 - prompt - - - ..\bin\win32\Release\ - TRACE - true - true - pdbonly - x86 - prompt - - - - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - true - full - x64 - prompt - - - ..\bin\x64\Release\ - TRACE - true - true - pdbonly - x64 - prompt - - - False - ..\CUETools.Processor\ICSharpCode.SharpZipLib.dll - @@ -259,6 +217,10 @@ {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + + {14EE067E-C218-4625-9540-2361AB27C4A6} + CUETools.Compression + {4911BD82-49EF-4858-8B51-5394F86739A4} CUETools.Processor diff --git a/CUETools/CUETools.sln b/CUETools/CUETools.sln index 9fc135f..9ace3dc 100644 --- a/CUETools/CUETools.sln +++ b/CUETools/CUETools.sln @@ -22,8 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.WavPack", " EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MACLib", "..\MAC_SDK\Source\MACLib\MACLib.vcproj", "{0B9C97D4-61B8-4294-A1DF-BA90752A1779}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodecWrappers", "CodecWrappers", "{85F88959-C9E9-4989-ACB1-67BA9D1BEFE7}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_static", "..\flac\src\libFLAC\libFLAC_static.vcproj", "{4CEFBC84-C215-11DB-8314-0800200C9A66}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwavpack", "..\wavpack-4.5.0\src\libwavpack.vcproj", "{5CCCB9CF-0384-458F-BA08-72B73866840F}" @@ -32,13 +30,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArCueDotNet", "..\ArCueDotN EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Processor", "..\CUETools.Processor\CUETools.Processor.csproj", "{4911BD82-49EF-4858-8B51-5394F86739A4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDCDDotNet", "..\HDCDDotNet\HDCDDotNet.csproj", "{32338A04-5B6B-4C63-8EE7-C6400F73B5D7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.HDCD", "..\HDCDDotNet\CUETools.Codecs.HDCD.csproj", "{32338A04-5B6B-4C63-8EE7-C6400F73B5D7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs", "..\CUETools.Codecs\CUETools.Codecs.csproj", "{6458A13A-30EF-45A9-9D58-E5031B17BEE2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.ALAC", "..\CUETools.Codecs.ALAC\CUETools.Codecs.ALAC.csproj", "{F2EC7193-D5E5-4252-9803-5CEB407E910F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnRarDotNet", "..\UnRarDotNet\UnRarDotNet.csproj", "{8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Compression.Rar", "..\UnRarDotNet\CUETools.Compression.Rar.csproj", "{8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.LossyWAV", "..\CUETools.Codecs.LossyWAV\CUETools.Codecs.LossyWAV.csproj", "{8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}" EndProject @@ -56,7 +54,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Ripper.SCSI", "..\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.ConsoleRipper", "..\CUETools.Ripper.Console\CUETools.ConsoleRipper.csproj", "{9253A314-1821-42BF-B02F-2BF986B1765D}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ConsoleApps", "ConsoleApps", "{4B59E09C-A51F-4B80-91BE-987904DCEF7D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Console Apps", "Console Apps", "{4B59E09C-A51F-4B80-91BE-987904DCEF7D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.CDImage", "..\CUETools.CDImage\CUETools.CDImage.csproj", "{1DD41038-D885-46C5-8DDE-E0B82F066584}" EndProject @@ -84,8 +82,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUEControls", "..\CUEContro EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.FLAKE", "..\CUETools.Codecs.FLAKE\CUETools.Codecs.FLAKE.csproj", "{082D6B9E-326E-4D15-9798-EDAE9EDE70A6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flake", "..\flake\flake.vcproj", "{F53335A2-C013-4354-98CC-83E612EAEB60}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Flake", "..\CUETools.Flake\CUETools.Flake.csproj", "{2379BAAF-A406-4477-BF53-2D6A326C24C8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.ALACEnc", "..\CUETools.ALACEnc\CUETools.ALACEnc.csproj", "{8E6E1763-39AE-491D-A10F-44C8844ABA5B}" @@ -108,7 +104,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.TestProcessor", "CUETools.TestProcessor\CUETools.TestProcessor.csproj", "{A430AD28-B76A-4ED0-AF7D-D13B8969297F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{39A17A65-E893-44B8-A312-DDCDD990D9D1}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Native Codecs", "Native Codecs", "{39A17A65-E893-44B8-A312-DDCDD990D9D1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Compression", "..\CUETools.Compression\CUETools.Compression.csproj", "{14EE067E-C218-4625-9540-2361AB27C4A6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Compression.Zip", "..\CUETools.Compression.Zip\CUETools.Compression.Zip.csproj", "{EA2CAE21-940C-4F51-A802-E02ABB97A9B5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{FD0D49DB-8F02-4A64-A9A3-A5AF54481770}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Managed Codecs", "Managed Codecs", "{93B7AE1D-DEF6-4A04-A222-5CDE09DF262D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ripper", "Ripper", "{90FD290C-5D65-42A6-AC9C-928730432116}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compression", "Compression", "{FD1DD69E-EC51-443D-B6A7-908B8E0EF9E2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Ripper", "..\CUETools.Ripper\CUETools.Ripper.csproj", "{D2700165-3E77-4B28-928D-551F5FC11954}" EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution @@ -214,7 +226,6 @@ Global {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x64.ActiveCfg = Debug|x64 {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x64.Build.0 = Debug|x64 {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Any CPU.Build.0 = Release|Any CPU {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Win32.ActiveCfg = Release|Any CPU {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x64.ActiveCfg = Release|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -238,10 +249,8 @@ Global {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Any CPU.Build.0 = Debug|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Win32.ActiveCfg = Debug|Any CPU - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x64.ActiveCfg = Debug|x64 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x64.Build.0 = Debug|x64 + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x64.ActiveCfg = Debug|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Any CPU.Build.0 = Release|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Win32.ActiveCfg = Release|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x64.ActiveCfg = Release|Any CPU {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -256,8 +265,7 @@ Global {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Any CPU.Build.0 = Debug|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Win32.ActiveCfg = Debug|Any CPU - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x64.ActiveCfg = Debug|x64 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x64.Build.0 = Debug|x64 + {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x64.ActiveCfg = Debug|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Any CPU.ActiveCfg = Release|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Any CPU.Build.0 = Release|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Win32.ActiveCfg = Release|Any CPU @@ -289,8 +297,7 @@ Global {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Win32.ActiveCfg = Debug|Any CPU - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x64.ActiveCfg = Debug|x64 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x64.Build.0 = Debug|x64 + {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x64.ActiveCfg = Debug|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Any CPU.Build.0 = Release|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Win32.ActiveCfg = Release|Any CPU @@ -298,8 +305,7 @@ Global {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Win32.ActiveCfg = Debug|Any CPU - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x64.ActiveCfg = Debug|x64 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x64.Build.0 = Debug|x64 + {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x64.ActiveCfg = Debug|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Any CPU.Build.0 = Release|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Win32.ActiveCfg = Release|Any CPU @@ -369,8 +375,7 @@ Global {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Any CPU.Build.0 = Debug|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Win32.ActiveCfg = Debug|Any CPU - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x64.ActiveCfg = Debug|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x64.Build.0 = Debug|x64 + {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x64.ActiveCfg = Debug|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Any CPU.ActiveCfg = Release|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Any CPU.Build.0 = Release|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Win32.ActiveCfg = Release|Any CPU @@ -401,12 +406,6 @@ Global {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Any CPU.Build.0 = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Win32.ActiveCfg = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|x64.ActiveCfg = Release|Any CPU - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Win32.ActiveCfg = Debug|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|x64.ActiveCfg = Debug|x64 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Any CPU.ActiveCfg = Release|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Win32.ActiveCfg = Release|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|x64.ActiveCfg = Release|x64 {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Win32.ActiveCfg = Debug|Any CPU @@ -475,17 +474,44 @@ Global {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|Any CPU.Build.0 = Release|Any CPU {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|Win32.ActiveCfg = Release|Any CPU {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|x64.ActiveCfg = Release|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Debug|Win32.ActiveCfg = Debug|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Debug|x64.ActiveCfg = Debug|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Release|Any CPU.Build.0 = Release|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Release|Win32.ActiveCfg = Release|Any CPU + {14EE067E-C218-4625-9540-2361AB27C4A6}.Release|x64.ActiveCfg = Release|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Debug|Win32.ActiveCfg = Debug|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Release|Any CPU.Build.0 = Release|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Release|Win32.ActiveCfg = Release|Any CPU + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5}.Release|x64.ActiveCfg = Release|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Debug|Win32.ActiveCfg = Debug|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Release|Any CPU.Build.0 = Release|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Release|Win32.ActiveCfg = Release|Any CPU + {D2700165-3E77-4B28-928D-551F5FC11954}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {F2EC7193-D5E5-4252-9803-5CEB407E910F} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {DFE50673-906C-4B8F-993B-A24CAD1CA17D} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {DDE1EA77-637C-4D5F-96F3-1328BC45CE80} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {39A17A65-E893-44B8-A312-DDCDD990D9D1} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} + {39A17A65-E893-44B8-A312-DDCDD990D9D1} = {FD0D49DB-8F02-4A64-A9A3-A5AF54481770} + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7} = {FD0D49DB-8F02-4A64-A9A3-A5AF54481770} + {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} = {FD0D49DB-8F02-4A64-A9A3-A5AF54481770} + {FD1DD69E-EC51-443D-B6A7-908B8E0EF9E2} = {FD0D49DB-8F02-4A64-A9A3-A5AF54481770} + {8B179853-B7D6-479C-B8B2-6CBCE835D040} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {CC2E74B6-534A-43D8-9F16-AC03FE955000} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {9AE965C4-301E-4C01-B90F-297AF341ACC6} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {E70FA90A-7012-4A52-86B5-362B699D1540} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} {0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} {4CEFBC84-C215-11DB-8314-0800200C9A66} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} {5CCCB9CF-0384-458F-BA08-72B73866840F} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} @@ -498,12 +524,20 @@ Global {8E6E1763-39AE-491D-A10F-44C8844ABA5B} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {1FCA8834-34E6-47CF-B53F-D8DF49F0819E} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} - {B75FA7AD-968E-4990-B342-1B4B17C850DF} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} + {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} + {DFE50673-906C-4B8F-993B-A24CAD1CA17D} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} + {F2EC7193-D5E5-4252-9803-5CEB407E910F} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} + {EA2CAE21-940C-4F51-A802-E02ABB97A9B5} = {FD1DD69E-EC51-443D-B6A7-908B8E0EF9E2} + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40} = {FD1DD69E-EC51-443D-B6A7-908B8E0EF9E2} + {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} = {90FD290C-5D65-42A6-AC9C-928730432116} + {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A} = {90FD290C-5D65-42A6-AC9C-928730432116} + {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C} = {90FD290C-5D65-42A6-AC9C-928730432116} + {D2700165-3E77-4B28-928D-551F5FC11954} = {90FD290C-5D65-42A6-AC9C-928730432116} {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} - {9AE965C4-301E-4C01-B90F-297AF341ACC6} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} - {E70FA90A-7012-4A52-86B5-362B699D1540} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} - {CC2E74B6-534A-43D8-9F16-AC03FE955000} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {B75FA7AD-968E-4990-B342-1B4B17C850DF} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} + {A430AD28-B76A-4ED0-AF7D-D13B8969297F} = {D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4} + {04945FB2-8410-4F14-8262-2ED18DCDACD6} = {D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4} EndGlobalSection EndGlobal diff --git a/CUETools/Properties/AssemblyInfo.cs b/CUETools/Properties/AssemblyInfo.cs index 465cd0d..2ba63af 100644 --- a/CUETools/Properties/AssemblyInfo.cs +++ b/CUETools/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Copyright 2006-2009 Moitah, Greg Chudov")] +[assembly: AssemblyCopyright("Copyright 2006-2007 Moitah, 2008-2010 Greg Chudov")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.3.1")] -[assembly: AssemblyFileVersion("2.0.3.1")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/CUETools/frmBatch.cs b/CUETools/frmBatch.cs index 2897188..bacfb6c 100644 --- a/CUETools/frmBatch.cs +++ b/CUETools/frmBatch.cs @@ -8,6 +8,7 @@ using System.Windows.Forms; using System.IO; using System.Threading; using System.Diagnostics; +using CUETools.Compression; using CUETools.Processor; namespace JDP @@ -84,7 +85,7 @@ namespace JDP }); } - private void PasswordRequired(object sender, ArchivePasswordRequiredEventArgs e) + private void PasswordRequired(object sender, CompressionPasswordRequiredEventArgs e) { this.Invoke((MethodInvoker)delegate() { @@ -226,8 +227,8 @@ namespace JDP try { CUESheet cueSheet = new CUESheet(_profile._config); - cueSheet.PasswordRequired += new ArchivePasswordRequiredHandler(PasswordRequired); - cueSheet.CUEToolsProgress += new CUEToolsProgressHandler(SetStatus); + cueSheet.PasswordRequired += new EventHandler(PasswordRequired); + cueSheet.CUEToolsProgress += new EventHandler(SetStatus); _workThread = new Thread(WriteAudioFilesThread); _workClass = cueSheet; diff --git a/CUETools/frmCUETools.cs b/CUETools/frmCUETools.cs index 1275814..9068ae9 100644 --- a/CUETools/frmCUETools.cs +++ b/CUETools/frmCUETools.cs @@ -38,6 +38,7 @@ using System.Threading; using System.Diagnostics; using CUETools.Processor; using CUETools.CDImage; +using CUETools.Compression; namespace JDP { public partial class frmCUETools : Form { @@ -356,9 +357,9 @@ namespace JDP { //} CUESheet cueSheet = new CUESheet(_profile._config); - cueSheet.PasswordRequired += new ArchivePasswordRequiredHandler(PasswordRequired); - cueSheet.CUEToolsProgress += new CUEToolsProgressHandler(SetStatus); - cueSheet.CUEToolsSelection += new CUEToolsSelectionHandler(MakeSelection); + cueSheet.PasswordRequired += new EventHandler(PasswordRequired); + cueSheet.CUEToolsProgress += new EventHandler(SetStatus); + cueSheet.CUEToolsSelection += new EventHandler(MakeSelection); cueSheet.WriteOffset = (int)numericWriteOffset.Value; object[] p = new object[7]; @@ -399,7 +400,7 @@ namespace JDP { } } - private void PasswordRequired(object sender, ArchivePasswordRequiredEventArgs e) + private void PasswordRequired(object sender, CompressionPasswordRequiredEventArgs e) { this.Invoke((MethodInvoker)delegate() { diff --git a/Freedb/Freedb.csproj b/Freedb/Freedb.csproj index 532c8b0..da8c182 100644 --- a/Freedb/Freedb.csproj +++ b/Freedb/Freedb.csproj @@ -74,31 +74,6 @@ none prompt - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - 285212672 - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - 285212672 - true - - - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - System diff --git a/HDCDDotNet/HDCDDotNet.csproj b/HDCDDotNet/CUETools.Codecs.HDCD.csproj similarity index 97% rename from HDCDDotNet/HDCDDotNet.csproj rename to HDCDDotNet/CUETools.Codecs.HDCD.csproj index 1da8f19..bd2e696 100644 --- a/HDCDDotNet/HDCDDotNet.csproj +++ b/HDCDDotNet/CUETools.Codecs.HDCD.csproj @@ -89,6 +89,7 @@ {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + False diff --git a/HDCDDotNet/HDCDDotNet.cs b/HDCDDotNet/HDCDDotNet.cs index 0293d1e..fb53412 100644 --- a/HDCDDotNet/HDCDDotNet.cs +++ b/HDCDDotNet/HDCDDotNet.cs @@ -26,7 +26,7 @@ namespace HDCDDotNet /**< True if the transient filter was disabled during decoding. */ }; - public class HDCDDotNet + public class HDCDDotNet : IAudioDest, IAudioFilter, IFormattable { public HDCDDotNet (int channels, int sample_rate, int output_bps, bool decode) { @@ -79,6 +79,57 @@ namespace HDCDDotNet } } + public AudioPCMConfig PCM + { + get { return AudioPCMConfig.RedBook; } + } + + public long FinalSampleCount + { + set { throw new Exception("unsupported"); } + } + + public long BlockSize + { + set { throw new Exception("unsupported"); } + } + + public string Path + { + get { throw new Exception("unsupported"); } + } + + public string Options + { + set { throw new Exception("unsupported"); } + } + + public int CompressionLevel + { + get { throw new Exception("unsupported"); } + set { throw new Exception("unsupported"); } + } + + public string ToString(string format, IFormatProvider formatProvider) + { + if (format == "f") + { + hdcd_decoder_statistics stats; + GetStatistics(out stats); + return string.Format(formatProvider, "peak extend: {0}, transient filter: {1}, gain: {2}", + (stats.enabled_peak_extend ? (stats.disabled_peak_extend ? "some" : "yes") : "none"), + (stats.enabled_transient_filter ? (stats.disabled_transient_filter ? "some" : "yes") : "none"), + stats.min_gain_adjustment == stats.max_gain_adjustment ? + (stats.min_gain_adjustment == 1.0 ? "none" : String.Format("{0:0.0}dB", (Math.Log10(stats.min_gain_adjustment) * 20))) : + String.Format(formatProvider, "{0:0.0}dB..{1:0.0}dB", (Math.Log10(stats.min_gain_adjustment) * 20), (Math.Log10(stats.max_gain_adjustment) * 20)) + ); + } + else + { + return Detected ? "HDCD detected" : ""; + } + } + public bool Decoding { get @@ -123,22 +174,14 @@ namespace HDCDDotNet stats = (hdcd_decoder_statistics) Marshal.PtrToStructure(_statsPtr, typeof(hdcd_decoder_statistics)); } - public void Process(int[,] sampleBuffer, int sampleCount) + public void Write(AudioBuffer buff) { #if !MONO - if (!hdcd_decoder_process_buffer_interleaved(_decoder, sampleBuffer, sampleCount)) + if (!hdcd_decoder_process_buffer_interleaved(_decoder, buff.Samples, buff.Length)) throw new Exception("HDCD processing error."); #endif } - public void Process(byte[] buff, int sampleCount) - { - if (_inSampleBuffer == null || _inSampleBuffer.GetLength(0) < sampleCount) - _inSampleBuffer = new int[sampleCount, _channelCount]; - AudioBuffer.BytesToFLACSamples_16(buff, 0, _inSampleBuffer, 0, sampleCount, _channelCount); - Process(_inSampleBuffer, sampleCount); - } - public void Flush () { #if !MONO @@ -147,6 +190,22 @@ namespace HDCDDotNet throw new Exception("error flushing buffer."); } + public void Close() + { +#if !MONO + if (_decoder != IntPtr.Zero) + hdcd_decoder_delete(_decoder); + _decoder = IntPtr.Zero; + if (_gch.IsAllocated) + _gch.Free(); +#endif + } + + public void Delete() + { + Close(); + } + public IAudioDest AudioDest { get @@ -211,12 +270,7 @@ namespace HDCDDotNet ~HDCDDotNet() { -#if !MONO - if (_decoder != IntPtr.Zero) - hdcd_decoder_delete(_decoder); - if (_gch.IsAllocated) - _gch.Free(); -#endif + Close(); } private delegate bool hdcd_decoder_write_callback(IntPtr decoder, IntPtr buffer, int samples, IntPtr client_data); diff --git a/LossyWAVSharp/LossyWAVSharp.csproj b/LossyWAVSharp/LossyWAVSharp.csproj index 55f5bbe..e7b894b 100644 --- a/LossyWAVSharp/LossyWAVSharp.csproj +++ b/LossyWAVSharp/LossyWAVSharp.csproj @@ -27,50 +27,6 @@ prompt 4 - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - diff --git a/UnRarDotNet/CUETools.Compression.Rar.csproj b/UnRarDotNet/CUETools.Compression.Rar.csproj new file mode 100644 index 0000000..954464b --- /dev/null +++ b/UnRarDotNet/CUETools.Compression.Rar.csproj @@ -0,0 +1,56 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40} + Library + Properties + CUETools.Compression.Rar + CUETools.Compression.Rar + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\any\Release\plugins\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + {14EE067E-C218-4625-9540-2361AB27C4A6} + CUETools.Compression + False + + + + + \ No newline at end of file diff --git a/UnRarDotNet/Properties/AssemblyInfo.cs b/UnRarDotNet/Properties/AssemblyInfo.cs index d6fdbc8..a36d93a 100644 --- a/UnRarDotNet/Properties/AssemblyInfo.cs +++ b/UnRarDotNet/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("UnRarDotNet")] +[assembly: AssemblyTitle("CUETools.Compression.Rar")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("UnRarDotNet")] +[assembly: AssemblyProduct("CUETools.Compression.Rar")] [assembly: AssemblyCopyright("Copyright © Gregory S. Chudov, Michael A. McCloskey")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.5.0")] +[assembly: AssemblyFileVersion("2.0.5.0")] diff --git a/UnRarDotNet/RarCompressionProvider.cs b/UnRarDotNet/RarCompressionProvider.cs new file mode 100644 index 0000000..c4ca8cf --- /dev/null +++ b/UnRarDotNet/RarCompressionProvider.cs @@ -0,0 +1,57 @@ +using System; +using System.IO; +using System.Collections.Generic; +using CUETools.Compression; + +namespace CUETools.Compression.Rar +{ + [CompressionProviderClass("rar")] + public class RarCompressionProvider: ICompressionProvider + { + private string _archivePath; + + public RarCompressionProvider(string path) + { + _archivePath = path; + } + + public void Close() + { + } + + ~RarCompressionProvider() + { + Close(); + } + + public Stream Decompress(string file) + { + RarStream stream = new RarStream(_archivePath, file); + stream.PasswordRequired += PasswordRequired; + stream.ExtractionProgress += ExtractionProgress; + return stream; + } + + public IEnumerable Contents + { + get + { + using (Unrar _unrar = new Unrar()) + { + _unrar.PasswordRequired += PasswordRequired; + _unrar.Open(_archivePath, Unrar.OpenMode.List); + while (_unrar.ReadHeader()) + { + if (!_unrar.CurrentFile.IsDirectory) + yield return _unrar.CurrentFile.FileName; + _unrar.Skip(); + } + _unrar.Close(); + } + } + } + + public event EventHandler PasswordRequired; + public event EventHandler ExtractionProgress; + } +} diff --git a/UnRarDotNet/RarStream.cs b/UnRarDotNet/RarStream.cs index 372f3a0..8433aeb 100644 --- a/UnRarDotNet/RarStream.cs +++ b/UnRarDotNet/RarStream.cs @@ -3,13 +3,14 @@ using System.Collections.Generic; using System.Text; using System.IO; using System.Threading; +using CUETools.Compression; /* Author: Gregory S. Chudov * */ -namespace UnRarDotNet +namespace CUETools.Compression.Rar { public class RarStream : Stream { @@ -176,8 +177,8 @@ namespace UnRarDotNet { throw new NotSupportedException(); } - public event PasswordRequiredHandler PasswordRequired; - public event ExtractionProgressHandler ExtractionProgress; + public event EventHandler PasswordRequired; + public event EventHandler ExtractionProgress; private Unrar _unrar; private string _fileName; diff --git a/UnRarDotNet/UnRarDotNet.csproj b/UnRarDotNet/UnRarDotNet.csproj deleted file mode 100644 index 48bdfdd..0000000 --- a/UnRarDotNet/UnRarDotNet.csproj +++ /dev/null @@ -1,92 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40} - Library - Properties - UnRarDotNet - UnRarDotNet - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\bin\any\Release\ - TRACE - prompt - 4 - - - true - ..\bin\x64\Debug\ - DEBUG;TRACE - full - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\x64\Release\ - TRACE - true - pdbonly - x64 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - true - ..\bin\Win32\Debug\ - DEBUG;TRACE - full - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - ..\bin\Win32\Release\ - TRACE - true - pdbonly - x86 - C:\Program Files (x86)\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules - true - GlobalSuppressions.cs - prompt - - - - - - - - - - - - - - \ No newline at end of file diff --git a/UnRarDotNet/Unrar.cs b/UnRarDotNet/Unrar.cs index a670de3..5a40367 100644 --- a/UnRarDotNet/Unrar.cs +++ b/UnRarDotNet/Unrar.cs @@ -3,7 +3,7 @@ using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Collections; - +using CUETools.Compression; /* Author: Michael A. McCloskey * Company: Schematrix @@ -17,7 +17,7 @@ using System.Collections; * some time in building your own products. */ -namespace UnRarDotNet +namespace CUETools.Compression.Rar { #region Event Delegate Definitions @@ -26,10 +26,6 @@ namespace UnRarDotNet /// public delegate void DataAvailableHandler(object sender, DataAvailableEventArgs e); /// - /// Represents the method that will handle extraction progress events - /// - public delegate void ExtractionProgressHandler(object sender, ExtractionProgressEventArgs e); - /// /// Represents the method that will handle missing archive volume events /// public delegate void MissingVolumeHandler(object sender, MissingVolumeEventArgs e); @@ -41,10 +37,6 @@ namespace UnRarDotNet /// Represents the method that will handle new file notifications /// public delegate void NewFileHandler(object sender, NewFileEventArgs e); - /// - /// Represents the method that will handle password required events - /// - public delegate void PasswordRequiredHandler(object sender, PasswordRequiredEventArgs e); #endregion @@ -283,7 +275,7 @@ namespace UnRarDotNet /// /// Event that is raised to indicate extraction progress /// - public event ExtractionProgressHandler ExtractionProgress; + public event EventHandler ExtractionProgress; /// /// Event that is raised when a required archive volume is missing /// @@ -299,7 +291,7 @@ namespace UnRarDotNet /// /// Event that is raised when a password is required before continuing /// - public event PasswordRequiredHandler PasswordRequired; + public event EventHandler PasswordRequired; #endregion @@ -804,7 +796,7 @@ namespace UnRarDotNet int result=-1; if(this.PasswordRequired!=null) { - PasswordRequiredEventArgs e=new PasswordRequiredEventArgs(); + CompressionPasswordRequiredEventArgs e = new CompressionPasswordRequiredEventArgs(); this.PasswordRequired(this, e); if(e.ContinueOperation && e.Password.Length>0) { @@ -837,7 +829,7 @@ namespace UnRarDotNet } if((this.ExtractionProgress!=null) && (this.currentFile!=null)) { - ExtractionProgressEventArgs e = new ExtractionProgressEventArgs(); + CompressionExtractionProgressEventArgs e = new CompressionExtractionProgressEventArgs(); e.FileName=this.currentFile.FileName; e.FileSize=this.currentFile.UnpackedSize; e.BytesExtracted=this.currentFile.BytesExtracted; @@ -913,12 +905,6 @@ namespace UnRarDotNet } } - public class PasswordRequiredEventArgs - { - public string Password=string.Empty; - public bool ContinueOperation=true; - } - public class NewFileEventArgs { public RARFileInfo fileInfo; @@ -928,15 +914,6 @@ namespace UnRarDotNet } } - public class ExtractionProgressEventArgs - { - public string FileName; - public long FileSize; - public long BytesExtracted; - public double PercentComplete; - public bool ContinueOperation=true; - } - public class RARFileInfo { public string FileName;