1) Fixed crash on source files that contain zero length tags

2) Fixed a glitch in filename corrector - it sometimes didn't replace underscores with spaces.
3) Fixed a bug when a broken cue sheet was created if artist, title or genre contained comma character.
3) Added .zip archive support
4) Added support for cue sheets which start with data track (mixed mode or "playstation type" cds)
This commit is contained in:
chudov
2009-01-28 04:53:13 +00:00
parent 0d86e75067
commit 3d94188f92
34 changed files with 3122 additions and 1567 deletions

View File

@@ -97,22 +97,18 @@ namespace CUETools.Processor
return dest;
}
public static IAudioDest GetAudioDest(string path, long finalSampleCount, CUEConfig config)
public static IAudioDest GetAudioDest(string path, long finalSampleCount, int bitsPerSample, int sampleRate, CUEConfig config)
{
string extension = Path.GetExtension(path).ToLower();
string filename = Path.GetFileNameWithoutExtension(path);
if (Path.GetExtension(filename).ToLower() != ".lossy")
{
int bitsPerSample = (config.detectHDCD && config.decodeHDCD) ? (config.decodeHDCDto24bit ? 24 : 20) : 16;
return GetAudioDest(path, bitsPerSample, 2, 44100, finalSampleCount, extension, config);
}
return GetAudioDest(path, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config);
string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension);
int destBitsPerSample = (config.detectHDCD && config.decodeHDCD) ? ((!config.decodeHDCDtoLW16 && config.decodeHDCDto24bit) ? 24 : 20) : 16;
int lossyBitsPerSample = (config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16;
IAudioDest lossyDest = GetAudioDest(path, lossyBitsPerSample, 2, 44100, finalSampleCount, extension, config);
IAudioDest lwcdfDest = config.lossyWAVHybrid ? GetAudioDest(lwcdfPath, destBitsPerSample, 2, 44100, finalSampleCount, extension, config) : null;
return new LossyWAVWriter(lossyDest, lwcdfDest, destBitsPerSample, 2, 44100, config.lossyWAVQuality);
IAudioDest lossyDest = GetAudioDest(path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, extension, config);
IAudioDest lwcdfDest = config.lossyWAVHybrid ? GetAudioDest(lwcdfPath, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config) : null;
return new LossyWAVWriter(lossyDest, lwcdfDest, bitsPerSample, 2, sampleRate, config.lossyWAVQuality);
}
}
}

View File

@@ -78,6 +78,10 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />

Binary file not shown.

View File

@@ -42,6 +42,7 @@ using Freedb;
using UnRarDotNet;
using CUETools.Codecs.FLAC;
#endif
using ICSharpCode.SharpZipLib.Zip;
namespace CUETools.Processor
{
@@ -487,6 +488,7 @@ namespace CUETools.Processor
private const int _arOffsetRange = 5 * 588 - 1;
private HDCDDotNet.HDCDDotNet hdcdDecoder;
private bool _outputLossyWAV = false;
private OutputAudioFormat _outputFormat = OutputAudioFormat.WAV;
private CUEConfig _config;
private string _cddbDiscIdTag;
private bool _isCD;
@@ -574,7 +576,7 @@ namespace CUETools.Processor
//Catalog = release.GetEvents().Count > 0 ? release.GetEvents()[0].Barcode : "";
for (int i = 1; i <= _toc.AudioTracks; i++)
{
MusicBrainz.Track track = release.GetTracks()[(int)_toc[i].Number - 1];
MusicBrainz.Track track = release.GetTracks()[(int)_toc[i].Number - 1]; // !!!!!! - _toc.FirstAudio
Tracks[i - 1].Title = track.GetTitle();
Tracks[i - 1].Artist = track.GetArtist();
}
@@ -693,8 +695,10 @@ namespace CUETools.Processor
TrackInfo trackInfo = null;
int timeRelativeToFileStart, absoluteFileStartTime = 0;
int fileTimeLengthSamples = 0, fileTimeLengthFrames = 0, i;
bool fileIsBinary = false;
int trackNumber = 0;
bool seenFirstFileIndex = false, seenDataTrack = false;
bool isAudioTrack = true;
bool seenFirstFileIndex = false;
List<IndexInfo> indexes = new List<IndexInfo>();
IndexInfo indexInfo;
NameValueCollection _trackTags = null;
@@ -727,23 +731,48 @@ namespace CUETools.Processor
}
}
}
else if (Path.GetExtension(pathIn).ToLower() == ".zip" || Path.GetExtension(pathIn).ToLower() == ".rar")
{
_archiveContents = new List<string>();
_isArchive = true;
_archivePath = pathIn;
if (Path.GetExtension(pathIn).ToLower() == ".rar")
{
#if !MONO
else if (Path.GetExtension(pathIn).ToLower() == ".rar")
{
Unrar _unrar = new Unrar();
_unrar.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
using (Unrar _unrar = new Unrar())
{
_unrar.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
_unrar.Open(pathIn, Unrar.OpenMode.List);
while (_unrar.ReadHeader())
{
if (!_unrar.CurrentFile.IsDirectory)
_archiveContents.Add(_unrar.CurrentFile.FileName);
_unrar.Skip();
}
_unrar.Close();
}
#else
throw new Exception("rar archives not supported on MONO.");
#endif
}
if (Path.GetExtension(pathIn).ToLower() == ".zip")
{
using (ZipFile _unzip = new ZipFile(pathIn))
{
foreach (ZipEntry e in _unzip)
{
if (e.IsFile)
_archiveContents.Add(e.Name);
}
_unzip.Close();
}
}
string cueName = null, cueText = null, logName = null;
List<string> cueNames = new List<string>();
List<string> logNames = new List<string>();
_unrar.Open(pathIn, Unrar.OpenMode.List);
_archiveContents = new List<string>();
while (_unrar.ReadHeader())
{
if (!_unrar.CurrentFile.IsDirectory)
_archiveContents.Add(_unrar.CurrentFile.FileName);
_unrar.Skip();
}
_unrar.Close();
foreach (string s in _archiveContents)
{
if (Path.GetExtension(s).ToLower() == ".cue")
@@ -751,7 +780,6 @@ namespace CUETools.Processor
if (Path.GetExtension(s).ToLower() == ".log")
logNames.Add(s);
}
if (cueNames.Count == 0)
throw new Exception("Input archive doesn't contain a cue sheet.");
if (cueNames.Count == 1)
@@ -780,12 +808,11 @@ namespace CUETools.Processor
if (cueName != null)
{
RarStream rarStream = new RarStream(pathIn, cueName);
rarStream.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
StreamReader cueReader = new StreamReader(rarStream, CUESheet.Encoding);
Stream archiveStream = OpenArchive(cueName, false);
StreamReader cueReader = new StreamReader(archiveStream, CUESheet.Encoding);
cueText = cueReader.ReadToEnd();
cueReader.Close();
rarStream.Close();
archiveStream.Close();
if (cueText == "")
throw new Exception("Empty cue sheet.");
}
@@ -793,21 +820,17 @@ namespace CUETools.Processor
throw new Exception("Input archive doesn't contain a cue sheet.");
if (logName != null)
{
RarStream rarStream = new RarStream(pathIn, logName);
rarStream.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
StreamReader logReader = new StreamReader(rarStream, CUESheet.Encoding);
Stream archiveStream = OpenArchive(logName, false);
StreamReader logReader = new StreamReader(archiveStream, CUESheet.Encoding);
_eacLog = logReader.ReadToEnd();
logReader.Close();
rarStream.Close();
archiveStream.Close();
}
_archiveCUEpath = Path.GetDirectoryName(cueName);
if (_config.autoCorrectFilenames)
cueText = CorrectAudioFilenames(_archiveCUEpath, cueText, false, _archiveContents);
sr = new StringReader(cueText);
_isArchive = true;
_archivePath = pathIn;
}
#endif
else if (Path.GetExtension(pathIn).ToLower() == ".cue")
{
if (_config.autoCorrectFilenames)
@@ -866,13 +889,11 @@ namespace CUETools.Processor
if (command == "FILE") {
fileType = line.Params[2].ToUpper();
if ((fileType == "BINARY") || (fileType == "MOTOROLA")) {
seenDataTrack = true;
}
else if (seenDataTrack) {
throw new Exception("Audio tracks cannot appear after data tracks.");
}
else {
if ((fileType == "BINARY") || (fileType == "MOTOROLA"))
fileIsBinary = true;
else
{
fileIsBinary = false;
if (!_hasEmbeddedCUESheet)
{
if (_isArchive)
@@ -903,59 +924,66 @@ namespace CUETools.Processor
seenFirstFileIndex = false;
}
}
else if (command == "TRACK") {
if (line.Params[2].ToUpper() != "AUDIO") {
seenDataTrack = true;
}
else if (seenDataTrack) {
throw new Exception("Audio tracks cannot appear after data tracks.");
}
else {
trackNumber = int.Parse(line.Params[1]);
if (trackNumber != _tracks.Count + 1) {
throw new Exception("Invalid track number.");
}
else if (command == "TRACK")
{
isAudioTrack = line.Params[2].ToUpper() == "AUDIO";
trackNumber = int.Parse(line.Params[1]);
if (trackNumber != _toc.TrackCount + 1)
throw new Exception("Invalid track number.");
_toc.AddTrack(new CDTrack((uint)trackNumber, 0, 0, isAudioTrack, false));
if (isAudioTrack)
{
trackInfo = new TrackInfo();
_tracks.Add(trackInfo);
_toc.AddTrack(new CDTrack((uint)trackNumber, 0, 0, true, false));
}
}
else if (seenDataTrack) {
// Ignore lines belonging to data tracks
}
else if (command == "INDEX") {
else if (command == "INDEX")
{
timeRelativeToFileStart = CDImageLayout.TimeFromString(line.Params[2]);
if (!seenFirstFileIndex)
{
if (timeRelativeToFileStart != 0)
{
throw new Exception("First index must start at file beginning.");
}
if (trackNumber > 0 && _trackTags != null && _trackTags.Count != 0)
_tracks[trackNumber-1]._trackTags = _trackTags;
seenFirstFileIndex = true;
sourceInfo.Path = pathAudio;
sourceInfo.Offset = 0;
sourceInfo.Length = (uint)fileTimeLengthSamples;
_sources.Add(sourceInfo);
if ((fileTimeLengthSamples % 588) != 0)
if (isAudioTrack)
{
sourceInfo.Path = null;
if (_tracks.Count > 0 && _trackTags != null && _trackTags.Count != 0)
_tracks[_tracks.Count - 1]._trackTags = _trackTags;
sourceInfo.Path = pathAudio;
sourceInfo.Offset = 0;
sourceInfo.Length = (uint)((fileTimeLengthFrames * 588) - fileTimeLengthSamples);
sourceInfo.Length = (uint)fileTimeLengthSamples;
_sources.Add(sourceInfo);
_paddedToFrame = true;
if ((fileTimeLengthSamples % 588) != 0)
{
sourceInfo.Path = null;
sourceInfo.Offset = 0;
sourceInfo.Length = (uint)((fileTimeLengthFrames * 588) - fileTimeLengthSamples);
_sources.Add(sourceInfo);
_paddedToFrame = true;
}
}
}
else if (fileIsBinary)
{
fileTimeLengthFrames = timeRelativeToFileStart + 150;
sourceInfo.Path = null;
sourceInfo.Offset = 0;
sourceInfo.Length = 150 * 588;
_sources.Add(sourceInfo);
}
indexInfo.Track = trackNumber;
indexInfo.Index = Int32.Parse(line.Params[1]);
indexInfo.Time = absoluteFileStartTime + timeRelativeToFileStart;
indexes.Add(indexInfo);
}
else if (command == "PREGAP") {
if (seenFirstFileIndex) {
else if (!isAudioTrack)
{
// Ignore lines belonging to data tracks
}
else if (command == "PREGAP")
{
if (seenFirstFileIndex)
throw new Exception("Pregap must occur at the beginning of a file.");
}
int pregapLength = CDImageLayout.TimeFromString(line.Params[1]);
indexInfo.Track = trackNumber;
indexInfo.Index = 0;
@@ -1009,6 +1037,24 @@ namespace CUETools.Processor
}
else
{
if (line.Params.Count > 2 && !line.IsQuoted[1] &&
(line.Params[0].ToUpper() == "TITLE" || line.Params[0].ToUpper() == "ARTIST" ||
(line.Params[0].ToUpper() == "REM" && line.Params[1].ToUpper() == "GENRE" && line.Params.Count > 3 && !line.IsQuoted[2])))
{
CUELine modline = new CUELine();
int nParams = line.Params[0].ToUpper() == "REM" ? 2 : 1;
for (int iParam = 0; iParam < nParams; iParam++)
{
modline.Params.Add(line.Params[iParam]);
modline.IsQuoted.Add(false);
}
string s = line.Params[nParams];
for (int iParam = nParams + 1; iParam < line.Params.Count; iParam++)
s += " " + line.Params[iParam];
modline.Params.Add(s);
modline.IsQuoted.Add(true);
line = modline;
}
_attributes.Add(line);
}
}
@@ -1017,8 +1063,16 @@ namespace CUETools.Processor
sr.Close();
}
if (trackNumber == 0) {
if (_tracks.Count == 0)
throw new Exception("File must contain at least one audio track.");
// Add dummy index 01 for data track
if (!_toc[_toc.TrackCount].IsAudio && indexes[indexes.Count - 1].Index == 0)
{
indexInfo.Track = trackNumber;
indexInfo.Index = 1;
indexInfo.Time = absoluteFileStartTime + fileTimeLengthFrames;
indexes.Add(indexInfo);
}
// Add dummy track for calculation purposes
@@ -1041,10 +1095,10 @@ namespace CUETools.Processor
}
// Calculate the length of each track
for (int iTrack = 1; iTrack <= TrackCount; iTrack++)
for (int iTrack = 1; iTrack <= _toc.TrackCount; iTrack++)
{
_toc[iTrack].Start = _toc[iTrack][1].Start;
_toc[iTrack].Length = (iTrack == TrackCount ? (uint)indexes[indexes.Count - 1].Time - _toc[iTrack].Start : _toc[iTrack + 1][1].Start - _toc[iTrack].Start);
_toc[iTrack].Length = (iTrack == _toc.TrackCount ? (uint)indexes[indexes.Count - 1].Time - _toc[iTrack].Start : _toc[iTrack + 1][1].Start - _toc[iTrack].Start);
}
// Store the audio filenames, generating generic names if necessary
@@ -1100,53 +1154,124 @@ namespace CUETools.Processor
if (_accurateRipId == null)
_accurateRipId = GetCommonTag("ACCURATERIPID");
if (_accurateRipId == null && _dataTrackLength == null && _eacLog != null)
if (_accurateRipId == null)
{
sr = new StringReader(_eacLog);
bool isEACLog = false;
CDImageLayout tocFromLog = new CDImageLayout();
while ((lineStr = sr.ReadLine()) != null)
if (_dataTrackLength != null)
{
if (isEACLog)
{
string[] n = lineStr.Split('|');
uint trNo, trStart, trEnd;
if (n.Length == 5 && uint.TryParse(n[0], out trNo) && uint.TryParse(n[3], out trStart) && uint.TryParse(n[4], out trEnd))
tocFromLog.AddTrack(new CDTrack(trNo, trStart, trEnd + 1 - trStart,
tocFromLog.TrackCount < _toc.TrackCount || trStart != tocFromLog[tocFromLog.TrackCount].End + 1U + 152U * 75U, false));
} else
if (lineStr.StartsWith("TOC of the extracted CD")
|| lineStr.StartsWith("Exact Audio Copy")
|| lineStr.StartsWith("CUERipper"))
isEACLog = true;
// TODO: check if we have a data track of unknown length already, and just change it's length!
CDImageLayout toc2 = new CDImageLayout(_toc);
toc2.AddTrack(new CDTrack((uint)_toc.TrackCount, _toc.Length + 152U * 75U, _dataTrackLength.Value, false, false));
_accurateRipId = AccurateRipVerify.CalculateAccurateRipId(toc2);
}
if (tocFromLog.TrackCount == _toc.TrackCount + 1 && !tocFromLog[tocFromLog.TrackCount].IsAudio)
_accurateRipId = AccurateRipVerify.CalculateAccurateRipId(tocFromLog);
}
if (_accurateRipId == null && _dataTrackLength != null)
{
CDImageLayout toc2 = new CDImageLayout(_toc);
toc2.AddTrack(new CDTrack((uint)_toc.TrackCount, _toc.Length + 152U * 75U, _dataTrackLength.Value, false, false));
_accurateRipId = AccurateRipVerify.CalculateAccurateRipId(toc2);
}
if (_dataTrackLength == null && _cddbDiscIdTag != null)
{
uint cddbDiscIdNum;
if (uint.TryParse(_cddbDiscIdTag, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out cddbDiscIdNum) && (cddbDiscIdNum & 0xff) == TrackCount + 1)
else
{
uint lengthFromTag = ((cddbDiscIdNum >> 8) & 0xffff);
_minDataTrackLength = ((lengthFromTag + _toc[1].Start / 75) - 152) * 75 - _toc.Length;
bool dtlFound = false;
if (_eacLog != null)
{
sr = new StringReader(_eacLog);
bool isEACLog = false;
CDImageLayout tocFromLog = new CDImageLayout();
while ((lineStr = sr.ReadLine()) != null)
{
if (isEACLog)
{
string[] n = lineStr.Split('|');
uint trNo, trStart, trEnd;
if (n.Length == 5 && uint.TryParse(n[0], out trNo) && uint.TryParse(n[3], out trStart) && uint.TryParse(n[4], out trEnd) && trNo == tocFromLog.TrackCount + 1)
{
bool isAudio = true;
if (tocFromLog.TrackCount >= _toc.TrackCount &&
trStart == tocFromLog[tocFromLog.TrackCount].End + 1U + 152U * 75U
)
isAudio = false;
if (tocFromLog.TrackCount < _toc.TrackCount &&
!_toc[tocFromLog.TrackCount + 1].IsAudio
)
isAudio = false;
tocFromLog.AddTrack(new CDTrack(trNo, trStart, trEnd + 1 - trStart, isAudio, false));
}
}
else
if (lineStr.StartsWith("TOC of the extracted CD")
|| lineStr.StartsWith("Exact Audio Copy")
|| lineStr.StartsWith("CUERipper"))
isEACLog = true;
}
if (tocFromLog.TrackCount == _toc.TrackCount + 1 && !tocFromLog[tocFromLog.TrackCount].IsAudio)
{
//_accurateRipId = AccurateRipVerify.CalculateAccurateRipId(tocFromLog);
_toc.AddTrack(new CDTrack((uint)tocFromLog.TrackCount, tocFromLog[tocFromLog.TrackCount].Start, tocFromLog[tocFromLog.TrackCount].Length, false, false));
dtlFound = true;
}
else if (tocFromLog.TrackCount == _toc.TrackCount)
{
if (!tocFromLog[1].IsAudio)
{
for (i = 2; i <= _toc.TrackCount; i++)
{
_toc[i].Start += tocFromLog[1].Length - _toc[1].Length;
for (int j = 0; j <= _toc[i].LastIndex; j++)
_toc[i][j].Start += tocFromLog[1].Length - _toc[1].Length;
}
_toc[1].Length = tocFromLog[1].Length;
dtlFound = true;
}
else if (!tocFromLog[tocFromLog.TrackCount].IsAudio)
{
_toc[_toc.TrackCount].Start = tocFromLog[_toc.TrackCount].Start;
_toc[_toc.TrackCount].Length = tocFromLog[_toc.TrackCount].Length;
_toc[_toc.TrackCount][0].Start = tocFromLog[_toc.TrackCount].Start;
_toc[_toc.TrackCount][1].Start = tocFromLog[_toc.TrackCount].Start;
dtlFound = true;
}
}
}
if (!dtlFound && _cddbDiscIdTag != null)
{
uint cddbDiscIdNum;
if (uint.TryParse(_cddbDiscIdTag, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out cddbDiscIdNum) && (cddbDiscIdNum & 0xff) == _toc.TrackCount + 1)
{
uint lengthFromTag = ((cddbDiscIdNum >> 8) & 0xffff);
_minDataTrackLength = ((lengthFromTag + _toc[1].Start / 75) - 152) * 75 - _toc.Length;
}
}
}
}
_accurateRipIdActual = AccurateRipVerify.CalculateAccurateRipId(_toc);
if (_accurateRipId == null)
_accurateRipId = _accurateRipIdActual;
_arVerify = new AccurateRipVerify(_toc);
if (_eacLog != null)
{
sr = new StringReader(_eacLog);
bool isEACLog = false;
int trNo = 1;
while ((lineStr = sr.ReadLine()) != null)
{
if (isEACLog && trNo <= TrackCount)
{
string[] s = { "Copy CRC ", "CRC <20><><EFBFBD><EFBFBD><EFBFBD>" };
string[] n = lineStr.Split(s, StringSplitOptions.None);
uint crc;
if (n.Length == 2 && uint.TryParse(n[1], NumberStyles.HexNumber, CultureInfo.CurrentCulture, out crc))
_arVerify.CRCLOG(trNo++, crc);
}
else
if (lineStr.StartsWith("Exact Audio Copy"))
isEACLog = true;
}
if (trNo == 2)
{
_arVerify.CRCLOG(0, _arVerify.CRCLOG(1));
if (TrackCount > 1)
_arVerify.CRCLOG(1, 0);
}
}
//if (!_dataTrackLength.HasValue && _cddbDiscIdTag != null)
//{
// uint cddbDiscIdNum = UInt32.Parse(_cddbDiscIdTag, NumberStyles.HexNumber);
@@ -1166,6 +1291,37 @@ namespace CUETools.Processor
}
}
private Stream OpenArchive(string fileName, bool showProgress)
{
#if !MONO
if (Path.GetExtension(_archivePath).ToLower() == ".rar")
{
RarStream rarStream = new RarStream(_archivePath, fileName);
rarStream.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
if (showProgress)
rarStream.ExtractionProgress += new ExtractionProgressHandler(unrar_ExtractionProgress);
return rarStream;
}
#endif
if (Path.GetExtension(_archivePath).ToLower() == ".zip")
{
ZipInputStream zipStream = new ZipInputStream(File.OpenRead(_archivePath));
ZipEntry theEntry = null;
while ((theEntry = zipStream.GetNextEntry()) != null)
if (theEntry.Name == fileName)
break;
if (theEntry == null)
throw new Exception("Archive entry not found.");
if (theEntry.IsCrypted)
{
unrar_PasswordRequired(this, new PasswordRequiredEventArgs());
zipStream.Password = _archivePassword;
}
return zipStream;
}
throw new Exception("Unknown archive type.");
}
private void ShowProgress(string status, double percentTrack, double percentDisk, string input, string output)
{
if (this.CUEToolsProgress == null)
@@ -1271,7 +1427,7 @@ namespace CUETools.Processor
private static string LocateFile(string dir, string file, List<string> contents) {
List<string> dirList, fileList;
string altDir, path;
string altDir;
dirList = new List<string>();
fileList = new List<string>();
@@ -1289,9 +1445,12 @@ namespace CUETools.Processor
for (int iDir = 0; iDir < dirList.Count; iDir++) {
for (int iFile = 0; iFile < fileList.Count; iFile++) {
path = Path.Combine(dirList[iDir], fileList[iFile]);
string path = Path.Combine(dirList[iDir], fileList[iFile]);
if ( (contents == null && File.Exists(path))
|| (contents != null && contents.Contains (path)))
|| (contents != null && contents.Contains(path)))
return path;
path = dirList[iDir] + '/' + fileList[iFile];
if (contents != null && contents.Contains(path))
return path;
}
}
@@ -1302,6 +1461,7 @@ namespace CUETools.Processor
public void GenerateFilenames(OutputAudioFormat format, bool outputLossyWAV, string outputPath)
{
_outputLossyWAV = outputLossyWAV;
_outputFormat = format;
_cuePath = outputPath;
string extension = General.FormatExtension(format);
@@ -1396,15 +1556,9 @@ namespace CUETools.Processor
IAudioSource audioSource;
ShowProgress("Analyzing input file...", 0.0, 0.0, path, null);
#if !MONO
if (_isArchive)
{
RarStream IO = new RarStream(_archivePath, path);
IO.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
IO.ExtractionProgress += new ExtractionProgressHandler(unrar_ExtractionProgress);
audioSource = AudioReadWrite.GetAudioSource(path, IO);
} else
#endif
audioSource = AudioReadWrite.GetAudioSource(path, OpenArchive(path, true));
else
audioSource = AudioReadWrite.GetAudioSource(path, null);
if ((audioSource.BitsPerSample != 16) ||
@@ -1523,8 +1677,8 @@ namespace CUETools.Processor
public string TOCContents()
{
StringWriter sw = new StringWriter();
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
sw.WriteLine("\t{0}", _toc[iTrack+1].Start + 150);
for (int iTrack = 1; iTrack <= _toc.TrackCount; iTrack++)
sw.WriteLine("\t{0}", _toc[iTrack].Start + 150);
sw.Close();
return sw.ToString();
}
@@ -1556,7 +1710,7 @@ namespace CUETools.Processor
if ((style == CUEStyle.GapsPrepended) ||
(style == CUEStyle.GapsLeftOut) ||
((style == CUEStyle.GapsAppended) &&
((_toc[iTrack+1].Pregap == 0) || ((iTrack == 0) && !htoaToFile))))
((_toc[_toc.FirstAudio + iTrack].Pregap == 0) || ((iTrack == 0) && !htoaToFile))))
{
WriteLine(sw, 0, String.Format("FILE \"{0}\" WAVE", _trackFilenames[iTrack]));
timeRelativeToFileStart = 0;
@@ -1566,16 +1720,16 @@ namespace CUETools.Processor
for (i = 0; i < _tracks[iTrack].Attributes.Count; i++)
WriteLine(sw, 2, _tracks[iTrack].Attributes[i]);
if (_toc[iTrack + 1].Pregap != 0)
if (_toc[_toc.FirstAudio + iTrack].Pregap != 0)
{
if (((style == CUEStyle.GapsLeftOut) ||
((style == CUEStyle.GapsAppended) && (iTrack == 0) && !htoaToFile) ||
((style == CUEStyle.SingleFile || style == CUEStyle.SingleFileWithCUE) && (iTrack == 0) && _usePregapForFirstTrackInSingleFile)))
WriteLine(sw, 2, "PREGAP " + CDImageLayout.TimeToString(_toc[iTrack + 1].Pregap));
WriteLine(sw, 2, "PREGAP " + CDImageLayout.TimeToString(_toc[_toc.FirstAudio + iTrack].Pregap));
else
{
WriteLine(sw, 2, String.Format("INDEX 00 {0}", CDImageLayout.TimeToString(timeRelativeToFileStart)));
timeRelativeToFileStart += _toc[iTrack + 1].Pregap;
timeRelativeToFileStart += _toc[_toc.FirstAudio + iTrack].Pregap;
if (style == CUEStyle.GapsAppended)
{
WriteLine(sw, 0, String.Format("FILE \"{0}\" WAVE", _trackFilenames[iTrack]));
@@ -1583,10 +1737,10 @@ namespace CUETools.Processor
}
}
}
for (iIndex = 1; iIndex <= _toc[iTrack+1].LastIndex; iIndex++)
for (iIndex = 1; iIndex <= _toc[_toc.FirstAudio + iTrack].LastIndex; iIndex++)
{
WriteLine(sw, 2, String.Format( "INDEX {0:00} {1}", iIndex, CDImageLayout.TimeToString(timeRelativeToFileStart)));
timeRelativeToFileStart += _toc.IndexLength(iTrack + 1, iIndex);
timeRelativeToFileStart += _toc.IndexLength(_toc.FirstAudio + iTrack, iIndex);
}
}
}
@@ -1779,7 +1933,8 @@ namespace CUETools.Processor
break;
}
ShowProgress((string)"Contacting AccurateRip database...", 0, (dtl - minDTL) / 75.0, null, null);
lock (this) {
lock (this)
{
if (_stop)
throw new StopException();
if (_pause)
@@ -1795,61 +1950,60 @@ namespace CUETools.Processor
{
_accurateRipId = _accurateRipIdActual;
}
} else
}
else
_arVerify.ContactAccurateRip(_accurateRipId);
if (_arVerify.AccResult != HttpStatusCode.OK)
if (_accurateRipMode == AccurateRipMode.VerifyThenConvert)
{
if (_accurateRipMode == AccurateRipMode.Verify || _config.noUnverifiedOutput)
if (_arVerify.AccResult != HttpStatusCode.OK && !_isCD)
{
if ((_accurateRipMode != AccurateRipMode.Verify && _config.writeArLogOnConvert) ||
(_accurateRipMode == AccurateRipMode.Verify && _config.writeArLogOnVerify))
if (_config.noUnverifiedOutput)
{
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
StreamWriter sw = new StreamWriter(Path.ChangeExtension(_cuePath, ".accurip"),
false, CUESheet.Encoding);
GenerateAccurateRipLog(sw);
sw.Close();
if (_config.writeArLogOnConvert)
{
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
StreamWriter sw = new StreamWriter(Path.ChangeExtension(_cuePath, ".accurip"),
false, CUESheet.Encoding);
GenerateAccurateRipLog(sw);
sw.Close();
}
if (_config.createTOC)
{
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
WriteText(Path.ChangeExtension(_cuePath, ".toc"), TOCContents());
}
return;
}
if (_config.createTOC)
{
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
WriteText(Path.ChangeExtension(_cuePath, ".toc"), TOCContents());
}
return;
}
if (_accurateRipMode == AccurateRipMode.VerifyThenConvert && _isCD)
else
{
_writeOffset = 0;
WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, true);
if (!_isCD)
{
uint tracksMatch;
int bestOffset;
if (_config.noUnverifiedOutput)
{
FindBestOffset(_config.encodeWhenConfidence, false, out tracksMatch, out bestOffset);
if (tracksMatch * 100 < _config.encodeWhenPercent * TrackCount || (_config.encodeWhenZeroOffset && bestOffset != 0))
SkipOutput = true;
}
if (!SkipOutput && _config.fixOffset)
{
FindBestOffset(_config.fixWhenConfidence, false, out tracksMatch, out bestOffset);
if (tracksMatch * 100 >= _config.fixWhenPercent * TrackCount)
_writeOffset = bestOffset;
}
}
_arVerify.CreateBackup(_writeOffset);
}
}
else if (_accurateRipMode == AccurateRipMode.VerifyThenConvert)
{
_writeOffset = 0;
WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, true);
uint tracksMatch;
int bestOffset;
if (_config.noUnverifiedOutput)
{
FindBestOffset(_config.encodeWhenConfidence, false, out tracksMatch, out bestOffset);
if (tracksMatch * 100 < _config.encodeWhenPercent * TrackCount || (_config.encodeWhenZeroOffset && bestOffset != 0))
SkipOutput = true;
}
if (!SkipOutput && _config.fixOffset)
{
FindBestOffset(_config.fixWhenConfidence, false, out tracksMatch, out bestOffset);
if (tracksMatch * 100 >= _config.fixWhenPercent * TrackCount)
_writeOffset = bestOffset;
}
_arVerify.CreateBackup(_writeOffset);
}
}
if (!SkipOutput)
@@ -1861,7 +2015,8 @@ namespace CUETools.Processor
}
if (_isCD)
destLengths = CalculateAudioFileLengths(style); // need to recalc, might have changed after scanning the CD
WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, _accurateRipMode == AccurateRipMode.Verify);
if (_outputFormat != OutputAudioFormat.NoAudio || _accurateRipMode == AccurateRipMode.Verify)
WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, _accurateRipMode == AccurateRipMode.Verify);
if (_accurateRipMode != AccurateRipMode.Verify)
{
string logContents = LOGContents();
@@ -1928,7 +2083,8 @@ namespace CUETools.Processor
}
}
if (_accurateRipMode != AccurateRipMode.None)
if (_accurateRipMode == AccurateRipMode.Verify ||
(_accurateRipMode != AccurateRipMode.None && _outputFormat != OutputAudioFormat.NoAudio))
{
ShowProgress((string)"Generating AccurateRip report...", 0, 0, null, null);
if (_accurateRipMode == AccurateRipMode.Verify && _config.writeArTagsOnVerify && _writeOffset == 0 && !_isArchive && !_isCD)
@@ -2184,14 +2340,14 @@ namespace CUETools.Processor
if (style == CUEStyle.SingleFile || style == CUEStyle.SingleFileWithCUE)
{
iDest++;
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], noOutput);
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, noOutput);
if (!noOutput)
SetAlbumTags(audioDest, bestOffset, style == CUEStyle.SingleFileWithCUE);
}
uint currentOffset = 0, previousOffset = 0;
uint trackLength = _toc.Pregap * 588;
uint diskLength = 588 * (_toc[_toc.TrackCount].IsAudio ? _toc[_toc.TrackCount].End + 1 : _toc[_toc.TrackCount - 1].End + 1);
uint diskLength = 588 * _toc.AudioLength;
uint diskOffset = 0;
if (_accurateRipMode != AccurateRipMode.None)
@@ -2199,7 +2355,9 @@ namespace CUETools.Processor
ShowProgress(String.Format("{2} track {0:00} ({1:00}%)...", 0, 0, noOutput ? "Verifying" : "Writing"), 0, 0.0, null, null);
#if !DEBUG
try
#endif
{
for (iTrack = 0; iTrack < TrackCount; iTrack++)
{
@@ -2212,20 +2370,20 @@ namespace CUETools.Processor
hdcdDecoder.AudioDest = null;
if (audioDest != null)
audioDest.Close();
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], noOutput);
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, noOutput);
if (!noOutput)
SetTrackTags(audioDest, iTrack, bestOffset);
}
for (iIndex = 0; iIndex <= _toc[iTrack + 1].LastIndex; iIndex++)
for (iIndex = 0; iIndex <= _toc[_toc.FirstAudio + iTrack].LastIndex; iIndex++)
{
uint samplesRemIndex = _toc.IndexLength(iTrack + 1, iIndex) * 588;
uint samplesRemIndex = _toc.IndexLength(_toc.FirstAudio + iTrack, iIndex) * 588;
if (iIndex == 1)
{
previousOffset = currentOffset;
currentOffset = 0;
trackLength = _toc[iTrack + 1].Length * 588;
trackLength = _toc[_toc.FirstAudio + iTrack].Length * 588;
}
if ((style == CUEStyle.GapsAppended) && (iIndex == 1))
@@ -2235,7 +2393,7 @@ namespace CUETools.Processor
if (audioDest != null)
audioDest.Close();
iDest++;
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], noOutput);
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, noOutput);
if (!noOutput)
SetTrackTags(audioDest, iTrack, bestOffset);
}
@@ -2246,7 +2404,7 @@ namespace CUETools.Processor
if (htoaToFile)
{
iDest++;
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], noOutput);
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, noOutput);
}
}
else if ((style == CUEStyle.GapsLeftOut) && (iIndex == 0))
@@ -2331,6 +2489,7 @@ namespace CUETools.Processor
}
}
}
#if !DEBUG
catch (Exception ex)
{
if (hdcdDecoder != null)
@@ -2344,6 +2503,7 @@ namespace CUETools.Processor
audioDest = null;
throw ex;
}
#endif
#if !MONO
//if (_isCD && audioSource != null && audioSource is CDDriveReader)
@@ -2353,17 +2513,16 @@ namespace CUETools.Processor
_toc = (CDImageLayout)_ripper.TOC.Clone();
if (_toc.Catalog != null)
Catalog = _toc.Catalog;
for (iTrack = 1; iTrack <= _toc.TrackCount; iTrack++)
if (_toc[iTrack].IsAudio)
for (iTrack = 0; iTrack < _toc.AudioTracks; iTrack++)
{
if (_toc[iTrack].ISRC != null)
General.SetCUELine(_tracks[iTrack - 1].Attributes, "ISRC", _toc[iTrack].ISRC, false);
//if (_toc[iTrack].DCP || _toc[iTrack].PreEmphasis)
if (_toc[_toc.FirstAudio + iTrack].ISRC != null)
General.SetCUELine(_tracks[iTrack].Attributes, "ISRC", _toc[_toc.FirstAudio + iTrack].ISRC, false);
//if (_toc[_toc.FirstAudio + iTrack].DCP || _toc[_toc.FirstAudio + iTrack].PreEmphasis)
//cueWriter.WriteLine(" FLAGS{0}{1}", audioSource.TOC[track].PreEmphasis ? " PRE" : "", audioSource.TOC[track].DCP ? " DCP" : "");
if (_toc[iTrack].DCP)
General.SetCUELine(_tracks[iTrack - 1].Attributes, "FLAGS", "DCP", false);
if (_toc[iTrack].PreEmphasis)
General.SetCUELine(_tracks[iTrack - 1].Attributes, "FLAGS", "PRE", false);
if (_toc[_toc.FirstAudio + iTrack].DCP)
General.SetCUELine(_tracks[iTrack].Attributes, "FLAGS", "DCP", false);
if (_toc[_toc.FirstAudio + iTrack].PreEmphasis)
General.SetCUELine(_tracks[iTrack].Attributes, "FLAGS", "PRE", false);
}
}
#endif
@@ -2435,17 +2594,18 @@ namespace CUETools.Processor
foundAll = false;
for (i = 0; i < audioExts.Length; i++)
{
foundAll = true;
List<string> newFiles = new List<string>();
for (int j = 0; j < origFiles.Count; j++)
{
string newFilename = Path.ChangeExtension(Path.GetFileName(origFiles[j]), audioExts[i].Substring(1));
foundAll &= LocateFile(dir, newFilename, files) != null;
newFiles.Add (newFilename);
string locatedFilename = LocateFile(dir, newFilename, files);
if (locatedFilename != null)
newFiles.Add(locatedFilename);
}
if (foundAll)
if (newFiles.Count == origFiles.Count)
{
audioFiles = newFiles.ToArray();
foundAll = true;
break;
}
}
@@ -2506,7 +2666,8 @@ namespace CUETools.Processor
if (style == CUEStyle.GapsPrepended || style == CUEStyle.GapsLeftOut)
iFile++;
for (iIndex = 0; iIndex <= _toc[iTrack+1].LastIndex; iIndex++) {
for (iIndex = 0; iIndex <= _toc[_toc.FirstAudio + iTrack].LastIndex; iIndex++)
{
if (style == CUEStyle.GapsAppended && (iIndex == 1 || (iIndex == 0 && iTrack == 0 && htoaToFile)))
iFile++;
@@ -2516,7 +2677,7 @@ namespace CUETools.Processor
discardOutput = (style == CUEStyle.GapsLeftOut && iIndex == 0);
if (!discardOutput)
fileLengths[iFile] += (int)_toc.IndexLength(iTrack + 1, iIndex) * 588;
fileLengths[iFile] += (int)_toc.IndexLength(_toc.FirstAudio + iTrack, iIndex) * 588;
}
}
@@ -2555,11 +2716,11 @@ namespace CUETools.Processor
}
}
private IAudioDest GetAudioDest(string path, int finalSampleCount, bool noOutput)
private IAudioDest GetAudioDest(string path, int finalSampleCount, int bps, bool noOutput)
{
if (noOutput)
return new DummyWriter(path, (_config.detectHDCD && _config.decodeHDCD) ? 24 : 16, 2, 44100);
return AudioReadWrite.GetAudioDest(path, finalSampleCount, _config);
return new DummyWriter(path, bps, 2, 44100);
return AudioReadWrite.GetAudioDest(path, finalSampleCount, bps, 44100, _config);
}
private IAudioSource GetAudioSource(int sourceIndex) {
@@ -2577,14 +2738,10 @@ namespace CUETools.Processor
//audioSource = _ripper;
audioSource = new AudioPipe(_ripper, 3);
} else
if (_isArchive)
{
RarStream IO = new RarStream(_archivePath, sourceInfo.Path);
IO.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, IO);
}
else
#endif
if (_isArchive)
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, OpenArchive(sourceInfo.Path, false));
else
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, null);
}
@@ -2865,9 +3022,9 @@ namespace CUETools.Processor
int last = _params.Count - 1;
for (int i = 0; i <= last; i++) {
if (_quoted[i]) sb.Append('"');
sb.Append(_params[i]);
if (_quoted[i]) sb.Append('"');
if (_quoted[i] || _params[i].Contains(" ")) sb.Append('"');
sb.Append(_params[i].Replace('"', '\''));
if (_quoted[i] || _params[i].Contains(" ")) sb.Append('"');
if (i < last) sb.Append(' ');
}

View File

@@ -0,0 +1,152 @@
namespace CUETools.Processor
{
partial class frmProperties
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmProperties));
this.textArtist = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textTitle = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.textYear = new System.Windows.Forms.TextBox();
this.textGenre = new System.Windows.Forms.TextBox();
this.textCatalog = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textArtist
//
resources.ApplyResources(this.textArtist, "textArtist");
this.textArtist.Name = "textArtist";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// textTitle
//
resources.ApplyResources(this.textTitle, "textTitle");
this.textTitle.Name = "textTitle";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
resources.ApplyResources(this.button1, "button1");
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.button2, "button2");
this.button2.Name = "button2";
this.button2.UseVisualStyleBackColor = true;
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// textYear
//
resources.ApplyResources(this.textYear, "textYear");
this.textYear.Name = "textYear";
//
// textGenre
//
resources.ApplyResources(this.textGenre, "textGenre");
this.textGenre.Name = "textGenre";
//
// textCatalog
//
resources.ApplyResources(this.textCatalog, "textCatalog");
this.textCatalog.Name = "textCatalog";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// frmProperties
//
this.AcceptButton = this.button1;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button2;
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.textCatalog);
this.Controls.Add(this.textGenre);
this.Controls.Add(this.textYear);
this.Controls.Add(this.label3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2);
this.Controls.Add(this.textTitle);
this.Controls.Add(this.label1);
this.Controls.Add(this.textArtist);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "frmProperties";
this.Load += new System.EventHandler(this.frmProperties_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textArtist;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textTitle;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textYear;
private System.Windows.Forms.TextBox textGenre;
private System.Windows.Forms.TextBox textCatalog;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CUETools.Processor;
namespace CUETools.Processor
{
public partial class frmProperties : Form
{
public frmProperties()
{
InitializeComponent();
}
private void frmProperties_Load(object sender, EventArgs e)
{
textArtist.Text = _cueSheet.Artist;
textTitle.Text = _cueSheet.Title;
textYear.Text = _cueSheet.Year;
textGenre.Text = _cueSheet.Genre;
textCatalog.Text = _cueSheet.Catalog;
}
public CUESheet CUE
{
get
{
return _cueSheet;
}
set
{
_cueSheet = value;
}
}
CUESheet _cueSheet;
private void button1_Click(object sender, EventArgs e)
{
_cueSheet.Artist = textArtist.Text;
_cueSheet.Title = textTitle.Text;
_cueSheet.Year = textYear.Text;
_cueSheet.Genre = textGenre.Text;
_cueSheet.Catalog = textCatalog.Text;
}
}
}

View File

@@ -0,0 +1,441 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="textArtist.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="textArtist.Location" type="System.Drawing.Point, System.Drawing">
<value>48, 12</value>
</data>
<data name="textArtist.Size" type="System.Drawing.Size, System.Drawing">
<value>374, 20</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="textArtist.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;textArtist.Name" xml:space="preserve">
<value>textArtist</value>
</data>
<data name="&gt;&gt;textArtist.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textArtist.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textArtist.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 15</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Artist</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 41</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>27, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Title</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="textTitle.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="textTitle.Location" type="System.Drawing.Point, System.Drawing">
<value>48, 38</value>
</data>
<data name="textTitle.Size" type="System.Drawing.Size, System.Drawing">
<value>374, 20</value>
</data>
<data name="textTitle.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;textTitle.Name" xml:space="preserve">
<value>textTitle</value>
</data>
<data name="&gt;&gt;textTitle.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textTitle.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textTitle.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
<value>347, 90</value>
</data>
<data name="button1.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="button1.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="button1.Text" xml:space="preserve">
<value>Ok</value>
</data>
<data name="&gt;&gt;button1.Name" xml:space="preserve">
<value>button1</value>
</data>
<data name="&gt;&gt;button1.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;button1.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="button2.Location" type="System.Drawing.Point, System.Drawing">
<value>266, 90</value>
</data>
<data name="button2.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="button2.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="button2.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="&gt;&gt;button2.Name" xml:space="preserve">
<value>button2</value>
</data>
<data name="&gt;&gt;button2.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;button2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;button2.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 67</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Year</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="textYear.Location" type="System.Drawing.Point, System.Drawing">
<value>48, 64</value>
</data>
<data name="textYear.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 20</value>
</data>
<data name="textYear.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;textYear.Name" xml:space="preserve">
<value>textYear</value>
</data>
<data name="&gt;&gt;textYear.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textYear.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textYear.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="textGenre.Location" type="System.Drawing.Point, System.Drawing">
<value>163, 64</value>
</data>
<data name="textGenre.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 20</value>
</data>
<data name="textGenre.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;textGenre.Name" xml:space="preserve">
<value>textGenre</value>
</data>
<data name="&gt;&gt;textGenre.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textGenre.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textGenre.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="textCatalog.Location" type="System.Drawing.Point, System.Drawing">
<value>318, 64</value>
</data>
<data name="textCatalog.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 20</value>
</data>
<data name="textCatalog.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;textCatalog.Name" xml:space="preserve">
<value>textCatalog</value>
</data>
<data name="&gt;&gt;textCatalog.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;textCatalog.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;textCatalog.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>121, 67</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 13</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Genre</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>269, 67</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>43, 13</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Catalog</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>434, 120</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterParent</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Release information</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmProperties</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>