1) Support for user-defined external commandline codecs, tested on TAK

2) Better support for zip archives, which previously worked only with flac/wav files
3) More reliable tag handling, using taglib-sharp. Pictures are now preserved.
4) ALAC decoder bug fixed
This commit is contained in:
chudov
2009-02-19 04:09:59 +00:00
parent 3d94188f92
commit f37d698f6a
32 changed files with 3965 additions and 2641 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Globalization;
using System.Net;
@@ -348,11 +347,6 @@ namespace CUETools.AccurateRip
}
}
public bool SetTags(NameValueCollection tags)
{
throw new Exception("unsupported");
}
public void Close()
{
if (_sampleCount != _finalSampleCount)

View File

@@ -476,7 +476,7 @@ namespace CUETools.Codecs.ALAC
for (int output_count = 0; output_count < output_size; output_count++)
{
int x = sign_modifier + decode_scalar(buff, ref pos, 31 - count_leading_zeroes((history >> 9) + 3), rice_kmodifier, readsamplesize);
output_buffer[output_count] = ((x + 1) >> 1) * (1 - ((x & 1) << 1));
output_buffer[output_count] = (x >> 1) ^ - (x & 1);
sign_modifier = 0;
/* now update the history */
@@ -542,7 +542,7 @@ namespace CUETools.Codecs.ALAC
return;
for (i = 0; i < output_size; i++)
{
sample += buf_err[i];
sample = extend_sign32(sample + buf_err[i], readsamplesize);
buf_out[i] = sample;
}
return;
@@ -554,7 +554,7 @@ namespace CUETools.Codecs.ALAC
/* read warm-up samples */
for (i = 0; i <= predictor_info.predictor_coef_num; i++)
{
sample += buf_err[i];
sample = extend_sign32(sample + buf_err[i], readsamplesize);
buf_out[i] = sample;
}
@@ -576,7 +576,7 @@ namespace CUETools.Codecs.ALAC
outval >>= pr->prediction_quantitization;
outval += sample_val + error_val;
buf_pos[pr->predictor_coef_num] = outval;
buf_pos[pr->predictor_coef_num] = extend_sign32(outval, readsamplesize);
if (error_val != 0)
{
@@ -614,14 +614,20 @@ namespace CUETools.Codecs.ALAC
{
for (i = 0; i < _samplesInBuffer; i++)
{
int a = buf_a[i];
int b = buf_b[i];
int midright = buf_a[i];
int diff = buf_b[i];
a -= (b * _interlacing_leftweight) >> _interlacing_shift;
b += a;
midright -= (diff * _interlacing_leftweight) >> _interlacing_shift;
buf_s[i * 2] = b;
buf_s[i * 2 + 1] = a;
buf_s[i * 2] = midright + diff;
buf_s[i * 2 + 1] = midright;
#if DEBUG
if (buf_s[i * 2] >= (1 << _bitsPerSample) || buf_s[i * 2] < -(1 << _bitsPerSample) ||
buf_s[i * 2 + 1] >= (1 << _bitsPerSample) || buf_s[i * 2 + 1] < -(1 << _bitsPerSample)
)
throw new Exception("overflow in ALAC decoder");
#endif
}
return;
}
@@ -1169,21 +1175,22 @@ namespace CUETools.Codecs.ALAC
qtmovie_add_any_parser("top.moov.trak.mdia.minf.stbl.stsz", new qtmovie_read_atom(qtmovie_read_chunk_stsz), null); // _sample_byte_size
qtmovie_add_nul_parser("top.moov.trak.mdia.minf.stbl.stsc"); /* skip these, no indexing for us! */
qtmovie_add_nul_parser("top.moov.trak.mdia.minf.stbl.stco"); /* skip these, no indexing for us! */
qtmovie_add_lst_parser("top.moov.udta", null);
qtmovie_add_lst_parser("top.moov.udta.meta", (uint)4);
qtmovie_add_lst_parser("top.moov.udta.meta.ilst", null);
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>nam", "TITLE");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>ART", "ARTIST");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>wrt", "COMPOSER");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>alb", "ALBUM");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>day", "DATE");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>gen", "GENRE");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.disk");
qtmovie_add_tag_parser("top.moov.udta.meta.ilst.trkn");
qtmovie_add_any_parser("top.moov.udta.meta.ilst.----", new qtmovie_read_atom(qtmovie_read_meta_freeform), null);
qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.mean", new qtmovie_read_atom(qtmovie_read_meta_mean), null);
qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.name", new qtmovie_read_atom(qtmovie_read_meta_name), null);
qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.data", new qtmovie_read_atom(qtmovie_read_meta_data), null);
qtmovie_add_nul_parser("top.moov.udta");
//qtmovie_add_lst_parser("top.moov.udta", null);
//qtmovie_add_lst_parser("top.moov.udta.meta", (uint)4);
//qtmovie_add_lst_parser("top.moov.udta.meta.ilst", null);
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>nam", "TITLE");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>ART", "ARTIST");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>wrt", "COMPOSER");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>alb", "ALBUM");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<2E>day", "DATE");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.<EFBFBD>gen", "GENRE");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.disk");
//qtmovie_add_tag_parser("top.moov.udta.meta.ilst.trkn");
//qtmovie_add_any_parser("top.moov.udta.meta.ilst.----", new qtmovie_read_atom(qtmovie_read_meta_freeform), null);
//qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.mean", new qtmovie_read_atom(qtmovie_read_meta_mean), null);
//qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.name", new qtmovie_read_atom(qtmovie_read_meta_name), null);
//qtmovie_add_any_parser("top.moov.udta.meta.ilst.----.data", new qtmovie_read_atom(qtmovie_read_meta_data), null);
while (true)
{

View File

@@ -3,10 +3,8 @@
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace System::Collections::Specialized;
using namespace System::Runtime::InteropServices;
using namespace System::IO;
using namespace APETagsDotNet;
using namespace CUETools::Codecs;
#ifndef _WAVEFORMATEX_
@@ -212,33 +210,6 @@ namespace CUETools { namespace Codecs { namespace APE {
}
}
virtual property NameValueCollection^ Tags {
NameValueCollection^ get ()
{
if (!_tags)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_IO, true);
_tags = apeTag->GetStringTags (true);
apeTag->Close ();
}
return _tags;
}
void set (NameValueCollection ^tags)
{
_tags = tags;
}
}
virtual bool UpdateTags(bool preserveTime)
{
Close ();
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
return true;
}
virtual array<Int32, 2>^ Read(array<Int32, 2>^ buff)
{
return AudioSamples::Read(this, buff);
@@ -273,7 +244,6 @@ namespace CUETools { namespace Codecs { namespace APE {
private:
IAPEDecompress * pAPEDecompress;
NameValueCollection^ _tags;
Int64 _sampleCount, _sampleOffset;
Int32 _bitsPerSample, _channelCount, _sampleRate;
UInt32 _bufferOffset, _bufferLength;
@@ -305,7 +275,6 @@ namespace CUETools { namespace Codecs { namespace APE {
throw gcnew Exception("Monkey's Audio doesn't support selected bits per sample value.");
_path = path;
_tags = gcnew NameValueCollection();
_winFileIO = NULL;
_compressionLevel = COMPRESSION_LEVEL_NORMAL;
@@ -344,15 +313,6 @@ namespace CUETools { namespace Codecs { namespace APE {
throw gcnew Exception("Samples written differs from the expected sample count.");
}
if (_tags->Count > 0)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_IO, true);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
_tags->Clear ();
}
if (_IO != nullptr)
{
_IO->Close ();
@@ -413,12 +373,6 @@ namespace CUETools { namespace Codecs { namespace APE {
}
}
virtual bool SetTags (NameValueCollection^ tags)
{
_tags = tags;
return true;
}
property Int32 CompressionLevel {
Int32 get() {
return _compressionLevel;
@@ -437,7 +391,6 @@ namespace CUETools { namespace Codecs { namespace APE {
Int32 _finalSampleCount, _samplesWritten;
Int32 _bitsPerSample, _channelCount, _sampleRate, _blockAlign;
Int32 _compressionLevel;
NameValueCollection^ _tags;
String^ _path;
Stream^ _IO;
GCHandle _gchIO, _gchBuffer;

View File

@@ -333,13 +333,9 @@
RelativePath="System.XML.dll"
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
/>
<ProjectReference
ReferencedProjectIdentifier="{CA200BCB-DFC6-4153-9BD4-785BC768B26B}"
RelativePathToProject="..\APETagDotNet\APETagDotNet.csproj"
/>
<ProjectReference
ReferencedProjectIdentifier="{6458A13A-30EF-45A9-9D58-E5031B17BEE2}"
RelativePathToProject="..\AudioCodecsDotNet\AudioCodecsDotNet.csproj"
RelativePathToProject="..\CUETools.Codecs\CUETools.Codecs.csproj"
/>
</References>
<Files>
@@ -349,11 +345,11 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\CUETools.Codecs.APE.cpp"
RelativePath=".\AssemblyInfo.cpp"
>
</File>
<File
RelativePath=".\AssemblyInfo.cpp"
RelativePath=".\CUETools.Codecs.APE.cpp"
>
</File>
<File

View File

@@ -33,7 +33,6 @@ using namespace System;
using namespace System::Text;
using namespace System::IO;
using namespace System::Collections::Generic;
using namespace System::Collections::Specialized;
using namespace System::Runtime::InteropServices;
using namespace CUETools::Codecs;
@@ -73,8 +72,6 @@ namespace CUETools { namespace Codecs { namespace FLAC {
public:
FLACReader(String^ path, Stream^ IO)
{
_tags = gcnew NameValueCollection();
_writeDel = gcnew DecoderWriteDelegate(this, &FLACReader::WriteCallback);
_metadataDel = gcnew DecoderMetadataDelegate(this, &FLACReader::MetadataCallback);
_errorDel = gcnew DecoderErrorDelegate(this, &FLACReader::ErrorCallback);
@@ -172,78 +169,69 @@ namespace CUETools { namespace Codecs { namespace FLAC {
}
}
virtual property NameValueCollection^ Tags {
NameValueCollection^ get () {
return _tags;
}
void set (NameValueCollection ^tags) {
_tags = tags;
}
}
//virtual bool UpdateTags (bool preserveTime)
//{
// Close ();
//
// FLAC__Metadata_Chain* chain = FLAC__metadata_chain_new ();
// if (!chain) return false;
virtual bool UpdateTags (bool preserveTime)
{
Close ();
// IntPtr pathChars = Marshal::StringToHGlobalAnsi(_path);
// int res = FLAC__metadata_chain_read (chain, (const char*)pathChars.ToPointer());
// Marshal::FreeHGlobal(pathChars);
// if (!res) {
// FLAC__metadata_chain_delete (chain);
// return false;
// }
// FLAC__Metadata_Iterator* i = FLAC__metadata_iterator_new ();
// FLAC__metadata_iterator_init (i, chain);
// do {
// FLAC__StreamMetadata* metadata = FLAC__metadata_iterator_get_block (i);
// if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT)
// FLAC__metadata_iterator_delete_block (i, false);
// } while (FLAC__metadata_iterator_next (i));
FLAC__Metadata_Chain* chain = FLAC__metadata_chain_new ();
if (!chain) return false;
// FLAC__StreamMetadata * vorbiscomment = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
// for (int tagno = 0; tagno <_tags->Count; tagno++)
// {
// String ^ tag_name = _tags->GetKey(tagno);
// int tag_len = tag_name->Length;
// char * tag = new char [tag_len + 1];
// IntPtr nameChars = Marshal::StringToHGlobalAnsi(tag_name);
// memcpy (tag, (const char*)nameChars.ToPointer(), tag_len);
// Marshal::FreeHGlobal(nameChars);
// tag[tag_len] = 0;
IntPtr pathChars = Marshal::StringToHGlobalAnsi(_path);
int res = FLAC__metadata_chain_read (chain, (const char*)pathChars.ToPointer());
Marshal::FreeHGlobal(pathChars);
if (!res) {
FLAC__metadata_chain_delete (chain);
return false;
}
FLAC__Metadata_Iterator* i = FLAC__metadata_iterator_new ();
FLAC__metadata_iterator_init (i, chain);
do {
FLAC__StreamMetadata* metadata = FLAC__metadata_iterator_get_block (i);
if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT)
FLAC__metadata_iterator_delete_block (i, false);
} while (FLAC__metadata_iterator_next (i));
// array<String^>^ tag_values = _tags->GetValues(tagno);
// for (int valno = 0; valno < tag_values->Length; valno++)
// {
// UTF8Encoding^ enc = gcnew UTF8Encoding();
// array<Byte>^ value_array = enc->GetBytes (tag_values[valno]);
// int value_len = value_array->Length;
// char * value = new char [value_len + 1];
// Marshal::Copy (value_array, 0, (IntPtr) value, value_len);
// value[value_len] = 0;
FLAC__StreamMetadata * vorbiscomment = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
for (int tagno = 0; tagno <_tags->Count; tagno++)
{
String ^ tag_name = _tags->GetKey(tagno);
int tag_len = tag_name->Length;
char * tag = new char [tag_len + 1];
IntPtr nameChars = Marshal::StringToHGlobalAnsi(tag_name);
memcpy (tag, (const char*)nameChars.ToPointer(), tag_len);
Marshal::FreeHGlobal(nameChars);
tag[tag_len] = 0;
// FLAC__StreamMetadata_VorbisComment_Entry entry;
// /* create and entry and append it */
// if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, tag, value)) {
// throw gcnew Exception("Unable to add tags, must be valid utf8.");
// }
// if(!FLAC__metadata_object_vorbiscomment_append_comment(vorbiscomment, entry, /*copy=*/false)) {
// throw gcnew Exception("Unable to add tags.");
// }
// delete [] value;
// }
// delete [] tag;
// }
array<String^>^ tag_values = _tags->GetValues(tagno);
for (int valno = 0; valno < tag_values->Length; valno++)
{
UTF8Encoding^ enc = gcnew UTF8Encoding();
array<Byte>^ value_array = enc->GetBytes (tag_values[valno]);
int value_len = value_array->Length;
char * value = new char [value_len + 1];
Marshal::Copy (value_array, 0, (IntPtr) value, value_len);
value[value_len] = 0;
FLAC__StreamMetadata_VorbisComment_Entry entry;
/* create and entry and append it */
if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, tag, value)) {
throw gcnew Exception("Unable to add tags, must be valid utf8.");
}
if(!FLAC__metadata_object_vorbiscomment_append_comment(vorbiscomment, entry, /*copy=*/false)) {
throw gcnew Exception("Unable to add tags.");
}
delete [] value;
}
delete [] tag;
}
FLAC__metadata_iterator_insert_block_after (i, vorbiscomment);
FLAC__metadata_iterator_delete (i);
FLAC__metadata_chain_sort_padding (chain);
res = FLAC__metadata_chain_write (chain, true, preserveTime);
FLAC__metadata_chain_delete (chain);
return 0 != res;
}
// FLAC__metadata_iterator_insert_block_after (i, vorbiscomment);
// FLAC__metadata_iterator_delete (i);
// FLAC__metadata_chain_sort_padding (chain);
// res = FLAC__metadata_chain_write (chain, true, preserveTime);
// FLAC__metadata_chain_delete (chain);
// return 0 != res;
//}
virtual property UInt64 Remaining {
UInt64 get() {
@@ -311,7 +299,6 @@ namespace CUETools { namespace Codecs { namespace FLAC {
Int32 _bitsPerSample, _channelCount, _sampleRate;
array<Int32, 2>^ _sampleBuffer;
array<unsigned char>^ _readBuffer;
NameValueCollection^ _tags;
String^ _path;
bool _decoderActive;
Stream^ _IO;
@@ -370,23 +357,23 @@ namespace CUETools { namespace Codecs { namespace FLAC {
_sampleRate = metadata->data.stream_info.sample_rate;
_sampleCount = metadata->data.stream_info.total_samples;
}
if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT)
{
for (unsigned tagno = 0; tagno < metadata->data.vorbis_comment.num_comments; tagno ++)
{
char * field_name, * field_value;
if(!FLAC__metadata_object_vorbiscomment_entry_to_name_value_pair(metadata->data.vorbis_comment.comments[tagno], &field_name, &field_value))
throw gcnew Exception("Unable to parse vorbis comment.");
String^ name = Marshal::PtrToStringAnsi ((IntPtr) field_name);
free (field_name);
array<Byte>^ bvalue = gcnew array<Byte>((int) strlen (field_value));
Marshal::Copy ((IntPtr) field_value, bvalue, 0, (int) strlen (field_value));
free (field_value);
UTF8Encoding^ enc = gcnew UTF8Encoding();
String ^value = enc->GetString (bvalue);
_tags->Add (name, value);
}
}
//if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT)
//{
// for (unsigned tagno = 0; tagno < metadata->data.vorbis_comment.num_comments; tagno ++)
// {
// char * field_name, * field_value;
// if(!FLAC__metadata_object_vorbiscomment_entry_to_name_value_pair(metadata->data.vorbis_comment.comments[tagno], &field_name, &field_value))
// throw gcnew Exception("Unable to parse vorbis comment.");
// String^ name = Marshal::PtrToStringAnsi ((IntPtr) field_name);
// free (field_name);
// array<Byte>^ bvalue = gcnew array<Byte>((int) strlen (field_value));
// Marshal::Copy ((IntPtr) field_value, bvalue, 0, (int) strlen (field_value));
// free (field_value);
// UTF8Encoding^ enc = gcnew UTF8Encoding();
// String ^value = enc->GetString (bvalue);
// _tags->Add (name, value);
// }
//}
}
void ErrorCallback(const FLAC__StreamDecoder *decoder,
@@ -474,7 +461,6 @@ namespace CUETools { namespace Codecs { namespace FLAC {
_paddingLength = 8192;
_verify = false;
_blockSize = 0;
_tags = gcnew NameValueCollection();
_encoder = FLAC__stream_encoder_new();
@@ -495,13 +481,10 @@ namespace CUETools { namespace Codecs { namespace FLAC {
FLAC__stream_encoder_delete(_encoder);
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) {
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount))
throw gcnew Exception("Samples written differs from the expected sample count.");
}
_tags->Clear ();
}
virtual void Delete()
{
try { Close (); } catch (Exception^) {}
@@ -536,12 +519,6 @@ namespace CUETools { namespace Codecs { namespace FLAC {
int get() { return _bitsPerSample; }
}
virtual bool SetTags (NameValueCollection^ tags)
{
_tags = tags;
return true;
}
virtual property String^ Path {
String^ get() {
return _path;
@@ -556,7 +533,18 @@ namespace CUETools { namespace Codecs { namespace FLAC {
if (!FLAC__stream_encoder_process_interleaved(_encoder,
(const FLAC__int32*)pSampleBuffer, sampleCount))
{
throw gcnew Exception("An error occurred while encoding.");
String^ state = gcnew String(FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_state(_encoder)]);
if (FLAC__stream_encoder_get_state(_encoder) == FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA)
{
FLAC__uint64 absolute_sample;
unsigned frame_number;
unsigned channel;
unsigned sample;
FLAC__int32 expected, got;
FLAC__stream_encoder_get_verify_decoder_error_stats(_encoder, &absolute_sample, &frame_number, &channel, &sample, &expected, &got);
state = state + String::Format("({0:x} instead of {1:x} @{2:x})", got, expected, absolute_sample);
}
throw gcnew Exception("An error occurred while encoding: " + state);
}
_samplesWritten += sampleCount;
@@ -606,7 +594,6 @@ namespace CUETools { namespace Codecs { namespace FLAC {
Boolean _verify;
FLAC__StreamMetadata **_metadataList;
int _metadataCount;
NameValueCollection^ _tags;
void Initialize() {
FLAC__StreamMetadata *padding, *seektable, *vorbiscomment;
@@ -625,39 +612,38 @@ namespace CUETools { namespace Codecs { namespace FLAC {
}
vorbiscomment = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
//for (int tagno = 0; tagno < _tags->Count; tagno++)
//{
// String ^ tag_name = _tags->GetKey(tagno);
// int tag_len = tag_name->Length;
// char * tag = new char [tag_len + 1];
// IntPtr nameChars = Marshal::StringToHGlobalAnsi(tag_name);
// memcpy (tag, (const char*)nameChars.ToPointer(), tag_len);
// Marshal::FreeHGlobal(nameChars);
// tag[tag_len] = 0;
for (int tagno = 0; tagno < _tags->Count; tagno++)
{
String ^ tag_name = _tags->GetKey(tagno);
int tag_len = tag_name->Length;
char * tag = new char [tag_len + 1];
IntPtr nameChars = Marshal::StringToHGlobalAnsi(tag_name);
memcpy (tag, (const char*)nameChars.ToPointer(), tag_len);
Marshal::FreeHGlobal(nameChars);
tag[tag_len] = 0;
// array<String^>^ tag_values = _tags->GetValues(tagno);
// for (int valno = 0; valno < tag_values->Length; valno++)
// {
// UTF8Encoding^ enc = gcnew UTF8Encoding();
// array<Byte>^ value_array = enc->GetBytes (tag_values[valno]);
// int value_len = value_array->Length;
// char * value = new char [value_len + 1];
// Marshal::Copy (value_array, 0, (IntPtr) value, value_len);
// value[value_len] = 0;
array<String^>^ tag_values = _tags->GetValues(tagno);
for (int valno = 0; valno < tag_values->Length; valno++)
{
UTF8Encoding^ enc = gcnew UTF8Encoding();
array<Byte>^ value_array = enc->GetBytes (tag_values[valno]);
int value_len = value_array->Length;
char * value = new char [value_len + 1];
Marshal::Copy (value_array, 0, (IntPtr) value, value_len);
value[value_len] = 0;
FLAC__StreamMetadata_VorbisComment_Entry entry;
/* create and entry and append it */
if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, tag, value)) {
throw gcnew Exception("Unable to add tags, must be valid utf8.");
}
if(!FLAC__metadata_object_vorbiscomment_append_comment(vorbiscomment, entry, /*copy=*/false)) {
throw gcnew Exception("Unable to add tags.");
}
delete [] value;
}
delete [] tag;
}
// FLAC__StreamMetadata_VorbisComment_Entry entry;
// /* create and entry and append it */
// if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, tag, value)) {
// throw gcnew Exception("Unable to add tags, must be valid utf8.");
// }
// if(!FLAC__metadata_object_vorbiscomment_append_comment(vorbiscomment, entry, /*copy=*/false)) {
// throw gcnew Exception("Unable to add tags.");
// }
// delete [] value;
// }
// delete [] tag;
//}
_metadataList[_metadataCount++] = vorbiscomment;
if (_paddingLength != 0) {

View File

@@ -23,7 +23,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using CUETools.Codecs;
@@ -118,13 +117,6 @@ namespace CUETools.Codecs.LossyWAV
}
}
public bool SetTags(NameValueCollection tags)
{
if (_audioDest != null) _audioDest.SetTags(tags);
if (_lwcdfDest != null) _lwcdfDest.SetTags(tags);
return true;
}
public string Path { get { return _audioDest.Path; } }
public void Delete()
@@ -972,23 +964,6 @@ namespace CUETools.Codecs.LossyWAV
}
}
public NameValueCollection Tags
{
get
{
return _audioSource.Tags;
}
set
{
_audioSource.Tags = value;
}
}
public bool UpdateTags(bool preserveTime)
{
return _audioSource.UpdateTags(preserveTime);
}
public string Path
{
get

View File

@@ -4,8 +4,6 @@
#include "CUETools.Codecs.TTA.h"
using namespace APETagsDotNet;
typedef void * HANDLE;
#include "../TTALib-1.1/TTAReader.h"
@@ -34,7 +32,6 @@ namespace TTA {
public:
TTAReader(String^ path, Stream^ IO)
{
_tags = nullptr;
_sampleOffset = 0;
_sampleBuffer = nullptr;
_path = path;
@@ -128,31 +125,6 @@ namespace TTA {
}
}
virtual property NameValueCollection^ Tags {
NameValueCollection^ get () {
if (!_tags)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_IO, true);
_tags = apeTag->GetStringTags (true);
apeTag->Close ();
}
return _tags;
}
void set (NameValueCollection ^tags) {
_tags = tags;
}
}
virtual bool UpdateTags (bool preserveTime)
{
Close ();
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
return true;
}
virtual property UInt64 Remaining {
UInt64 get() {
return _sampleCount - _sampleOffset + SamplesInBuffer;
@@ -235,7 +207,6 @@ namespace TTA {
Int32 _bitsPerSample, _channelCount, _sampleRate;
array<Int32, 2>^ _sampleBuffer;
array<unsigned char>^ _readBuffer;
NameValueCollection^ _tags;
String^ _path;
Stream^ _IO;
UInt32 _bufferOffset, _bufferLength;
@@ -267,7 +238,6 @@ namespace TTA {
_sampleRate = sampleRate;
_compressionLevel = 5;
_blockSize = 0;
_tags = gcnew NameValueCollection();
}
virtual void Close() {
@@ -292,20 +262,9 @@ namespace TTA {
if (_IO)
_IO->Close();
if (_tags->Count > 0)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
_tags->Clear ();
}
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) {
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount))
throw gcnew Exception("Samples written differs from the expected sample count.");
}
_tags->Clear ();
}
virtual void Delete()
{
@@ -341,12 +300,6 @@ namespace TTA {
int get() { return _bitsPerSample; }
}
virtual bool SetTags (NameValueCollection^ tags)
{
_tags = tags;
return true;
}
virtual property String^ Path {
String^ get() {
return _path;
@@ -397,7 +350,6 @@ namespace TTA {
Int64 _finalSampleCount, _samplesWritten, _blockSize;
Int32 _bitsPerSample, _channelCount, _sampleRate;
Int32 _compressionLevel;
NameValueCollection^ _tags;
void Initialize()
{

View File

@@ -6,6 +6,5 @@ using namespace System;
using namespace System::Text;
using namespace System::IO;
using namespace System::Collections::Generic;
using namespace System::Collections::Specialized;
using namespace System::Runtime::InteropServices;
using namespace CUETools::Codecs;

View File

@@ -332,10 +332,6 @@
ReferencedProjectIdentifier="{6458A13A-30EF-45A9-9D58-E5031B17BEE2}"
RelativePathToProject="..\CUETools.Codecs\CUETools.Codecs.csproj"
/>
<ProjectReference
ReferencedProjectIdentifier="{CA200BCB-DFC6-4153-9BD4-785BC768B26B}"
RelativePathToProject="..\APETagDotNet\APETagDotNet.csproj"
/>
</References>
<Files>
<Filter

View File

@@ -31,10 +31,8 @@
using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Collections::Specialized;
using namespace System::Security::Cryptography;
using namespace System::IO;
using namespace APETagsDotNet;
using namespace CUETools::Codecs;
#include <stdio.h>
@@ -157,31 +155,6 @@ namespace CUETools { namespace Codecs { namespace WavPack {
}
}
virtual property NameValueCollection^ Tags {
NameValueCollection^ get () {
if (!_tags)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_IO, true);
_tags = apeTag->GetStringTags (true);
apeTag->Close ();
}
return _tags;
}
void set (NameValueCollection ^tags) {
_tags = tags;
}
}
virtual bool UpdateTags(bool preserveTime)
{
Close ();
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
return true;
}
virtual void Close()
{
if (_wpc != NULL)
@@ -215,7 +188,6 @@ namespace CUETools { namespace Codecs { namespace WavPack {
private:
WavpackContext *_wpc;
NameValueCollection^ _tags;
Int32 _sampleCount, _sampleOffset;
Int32 _bitsPerSample, _channelCount, _sampleRate;
String^ _path;
@@ -334,7 +306,6 @@ namespace CUETools { namespace Codecs { namespace WavPack {
throw gcnew Exception("Bits per sample must be 16..24.");
_path = path;
_tags = gcnew NameValueCollection();
_compressionMode = 1;
_extraMode = 0;
@@ -366,20 +337,10 @@ namespace CUETools { namespace Codecs { namespace WavPack {
_wpc = WavpackCloseFile(_wpc);
fclose(_hFile);
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) {
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount))
throw gcnew Exception("Samples written differs from the expected sample count.");
}
if (_tags->Count > 0)
{
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
apeTag->SetStringTags (_tags, true);
apeTag->Save();
apeTag->Close();
_tags->Clear ();
}
}
virtual void Delete()
{
try { Close (); } catch (Exception^) {}
@@ -455,12 +416,6 @@ namespace CUETools { namespace Codecs { namespace WavPack {
}
}
virtual bool SetTags (NameValueCollection^ tags)
{
_tags = tags;
return true;
}
property Int32 CompressionMode {
Int32 get() {
return _compressionMode;
@@ -510,7 +465,6 @@ namespace CUETools { namespace Codecs { namespace WavPack {
Int32 _finalSampleCount, _samplesWritten;
Int32 _bitsPerSample, _channelCount, _sampleRate, _blockAlign;
Int32 _compressionMode, _extraMode, _blockSize;
NameValueCollection^ _tags;
String^ _path;
bool _md5Sum;
MD5^ _md5hasher;

View File

@@ -332,13 +332,9 @@
RelativePath="System.XML.dll"
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
/>
<ProjectReference
ReferencedProjectIdentifier="{CA200BCB-DFC6-4153-9BD4-785BC768B26B}"
RelativePathToProject="..\APETagDotNet\APETagDotNet.csproj"
/>
<ProjectReference
ReferencedProjectIdentifier="{6458A13A-30EF-45A9-9D58-E5031B17BEE2}"
RelativePathToProject="..\AudioCodecsDotNet\AudioCodecsDotNet.csproj"
RelativePathToProject="..\CUETools.Codecs\CUETools.Codecs.csproj"
/>
</References>
<Files>

View File

@@ -2,8 +2,8 @@ using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Threading;
using System.Diagnostics;
namespace CUETools.Codecs
{
@@ -13,8 +13,6 @@ namespace CUETools.Codecs
int[,] Read(int[,] buff);
ulong Length { get; }
ulong Position { get; set; }
NameValueCollection Tags { get; set; }
bool UpdateTags(bool preserveTime);
ulong Remaining { get; }
void Close();
int BitsPerSample { get; }
@@ -26,7 +24,6 @@ namespace CUETools.Codecs
public interface IAudioDest
{
void Write(int[,] buff, uint sampleCount);
bool SetTags(NameValueCollection tags);
void Close();
void Delete();
int BitsPerSample { get; }
@@ -189,11 +186,6 @@ namespace CUETools.Codecs
_bitsPerSample = bitsPerSample;
}
public bool SetTags(NameValueCollection tags)
{
return false;
}
public void Close()
{
}
@@ -288,22 +280,6 @@ namespace CUETools.Codecs
}
}
public NameValueCollection Tags
{
get
{
return new NameValueCollection();
}
set
{
}
}
public bool UpdateTags(bool preserveTime)
{
return false;
}
public uint Read(int [,] buff, uint sampleCount)
{
uint samplesRemaining = (uint)(_sampleCount - _sampleOffset);
@@ -536,22 +512,6 @@ namespace CUETools.Codecs
}
}
public NameValueCollection Tags
{
get
{
return new NameValueCollection();
}
set
{
}
}
public bool UpdateTags(bool preserveTime)
{
return false;
}
public uint Read(int[,] buff, uint sampleCount)
{
if (sampleCount > Remaining)
@@ -562,8 +522,14 @@ namespace CUETools.Codecs
int byteCount = (int) sampleCount * _blockAlign;
if (_sampleBuffer == null || _sampleBuffer.Length < byteCount)
_sampleBuffer = new byte[byteCount];
if (_IO.Read(_sampleBuffer, 0, (int)byteCount) != byteCount)
int pos = 0;
do
{
int len = _IO.Read(_sampleBuffer, pos, (int)byteCount - pos);
if (len <= 0)
throw new Exception("Incomplete file read.");
pos += len;
} while (pos < byteCount);
AudioSamples.BytesToFLACSamples(_sampleBuffer, 0, buff, 0,
sampleCount, _channelCount, _bitsPerSample);
_samplePos += sampleCount;
@@ -604,11 +570,6 @@ namespace CUETools.Codecs
_bw = new BinaryWriter(_IO);
}
public bool SetTags(NameValueCollection tags)
{
return false;
}
public void WriteChunk(uint fcc, byte[] data)
{
if (_sampleLen > 0)
@@ -766,6 +727,219 @@ namespace CUETools.Codecs
public string Path { get { return _path; } }
}
public class UserDefinedWriter : IAudioDest
{
string _path, _encoder, _encoderParams;
Process _encoderProcess;
WAVWriter wrt;
public UserDefinedWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO, string encoder, string encoderParams)
{
_path = path;
_encoder = encoder;
_encoderParams = encoderParams;
_encoderProcess = new Process();
_encoderProcess.StartInfo.FileName = _encoder;
_encoderProcess.StartInfo.Arguments = _encoderParams.Replace("%O", "\"" + path + "\"");
_encoderProcess.StartInfo.CreateNoWindow = true;
_encoderProcess.StartInfo.RedirectStandardInput = true;
_encoderProcess.StartInfo.UseShellExecute = false;
bool started = false;
Exception ex = null;
try
{
started = _encoderProcess.Start();
}
catch (Exception _ex)
{
ex = _ex;
}
if (!started)
throw new Exception(_encoder + ": " + (ex == null ? "please check the path" : ex.Message));
wrt = new WAVWriter(path, bitsPerSample, channelCount, sampleRate, _encoderProcess.StandardInput.BaseStream);
}
public void Close()
{
wrt.Close();
if (!_encoderProcess.HasExited)
_encoderProcess.WaitForExit();
if (_encoderProcess.ExitCode != 0)
throw new Exception(String.Format("{0} returned error code {1}", _encoder, _encoderProcess.ExitCode));
}
public void Delete()
{
Close();
File.Delete(_path);
}
public long Position
{
get
{
return wrt.Position;
}
}
public long FinalSampleCount
{
set { wrt.FinalSampleCount = value; }
}
public long BlockSize
{
set { }
}
public int BitsPerSample
{
get { return wrt.BitsPerSample; }
}
public void Write(int[,] buff, uint sampleCount)
{
wrt.Write(buff, sampleCount);
//_sampleLen += sampleCount;
}
public string Path { get { return _path; } }
}
public class UserDefinedReader : IAudioSource
{
string _path, _decoder, _decoderParams;
bool _apev2tags;
Process _decoderProcess;
WAVReader rdr;
public UserDefinedReader(string path, Stream IO, string decoder, string decoderParams, bool apev2tags)
{
_path = path;
_decoder = decoder;
_decoderParams = decoderParams;
_apev2tags = apev2tags;
_decoderProcess = null;
rdr = null;
}
void Initialize()
{
if (_decoderProcess != null)
return;
_decoderProcess = new Process();
_decoderProcess.StartInfo.FileName = _decoder;
_decoderProcess.StartInfo.Arguments = _decoderParams.Replace("%I", "\"" + _path + "\"");
_decoderProcess.StartInfo.CreateNoWindow = true;
_decoderProcess.StartInfo.RedirectStandardOutput = true;
_decoderProcess.StartInfo.UseShellExecute = false;
bool started = false;
Exception ex = null;
try
{
started = _decoderProcess.Start();
}
catch (Exception _ex)
{
ex = _ex;
}
if (!started)
throw new Exception(_decoder + ": " + (ex == null ? "please check the path" : ex.Message));
rdr = new WAVReader(_path, _decoderProcess.StandardOutput.BaseStream);
}
public void Close()
{
if (rdr != null)
rdr.Close();
if (_decoderProcess != null && !_decoderProcess.HasExited)
try { _decoderProcess.Kill(); _decoderProcess.WaitForExit(); }
catch { }
}
public ulong Position
{
get
{
Initialize();
return rdr.Position;
}
set
{
Initialize();
rdr.Position = value;
}
}
public ulong Length
{
get
{
Initialize();
return rdr.Length;
}
}
public ulong Remaining
{
get
{
Initialize();
return rdr.Remaining;
}
}
public int ChannelCount
{
get
{
Initialize();
return rdr.ChannelCount;
}
}
public int SampleRate
{
get
{
Initialize();
return rdr.SampleRate;
}
}
public int BitsPerSample
{
get
{
Initialize();
return rdr.BitsPerSample;
}
}
public int BlockAlign
{
get
{
Initialize();
return rdr.BlockAlign;
}
}
public uint Read(int[,] buff, uint sampleCount)
{
Initialize();
return rdr.Read(buff, sampleCount);
}
public int[,] Read(int[,] buff)
{
return AudioSamples.Read(this, buff);
}
public string Path { get { return _path; } }
}
public class AudioPipe : IAudioSource//, IDisposable
{
private readonly Queue<int[,]> _buffer = new Queue<int[,]>();
@@ -899,22 +1073,6 @@ namespace CUETools.Codecs
}
}
public NameValueCollection Tags
{
get
{
return _source.Tags;
//return new NameValueCollection();
}
set
{
}
}
public bool UpdateTags(bool preserveTime)
{
return false;
}
public int[,] Read(int[,] buff)
{

View File

@@ -81,6 +81,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\taglib-sharp\taglib-sharp.csproj">
<Project>{4CC18776-125E-4318-9D24-D60110AD9697}</Project>
<Name>taglib-sharp</Name>
</ProjectReference>
<ProjectReference Include="..\CUETools.Codecs\CUETools.Codecs.csproj">
<Project>{6458A13A-30EF-45A9-9D58-E5031B17BEE2}</Project>
<Name>CUETools.Codecs</Name>

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using CUETools.Codecs;
using CUETools.Processor;
@@ -33,16 +34,18 @@ namespace CUETools.Converter
DateTime start = DateTime.Now;
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
CUEConfig config = new CUEConfig();
SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt");
config.Load(sr);
config.lossyWAVHybrid = false;
#if !DEBUG
try
#endif
{
IAudioSource audioSource = AudioReadWrite.GetAudioSource(sourceFile, null);
IAudioSource audioSource = AudioReadWrite.GetAudioSource(sourceFile, null, config);
IAudioDest audioDest = AudioReadWrite.GetAudioDest(destFile, (long)audioSource.Length, audioSource.BitsPerSample, audioSource.SampleRate, config);
int[,] buff = new int[0x1000, audioSource.ChannelCount];
int[,] buff = new int[0x4000, audioSource.ChannelCount];
audioDest.SetTags(audioSource.Tags);
Console.WriteLine("Filename : {0}", sourceFile);
Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.SampleRate, audioSource.ChannelCount, audioSource.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.SampleRate));
@@ -72,6 +75,16 @@ namespace CUETools.Converter
);
audioSource.Close();
audioDest.Close();
TagLib.UserDefined.AdditionalFileTypes.Config = config;
TagLib.File sourceInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(sourceFile));
TagLib.File destInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(destFile));
if (Tagging.UpdateTags(destInfo, Tagging.Analyze(sourceInfo), config))
{
sourceInfo.Tag.CopyTo(destInfo.Tag, true);
destInfo.Tag.Pictures = sourceInfo.Tag.Pictures;
destInfo.Save();
}
}
#if !DEBUG
catch (Exception ex)

View File

@@ -15,7 +15,7 @@ using System.Collections.Specialized;
namespace CUETools.Processor
{
public static class AudioReadWrite {
public static IAudioSource GetAudioSource(string path, Stream IO, string extension)
public static IAudioSource GetAudioSource(string path, Stream IO, string extension, CUEConfig config)
{
switch (extension)
{
@@ -34,25 +34,27 @@ namespace CUETools.Processor
return new TTAReader(path, IO);
#endif
default:
if (extension == "." + config.udc1Extension && config.udc1Decoder != "")
return new UserDefinedReader(path, IO, config.udc1Decoder, config.udc1Params, config.udc1APEv2);
throw new Exception("Unsupported audio type: " + path);
}
}
public static IAudioSource GetAudioSource(string path, Stream IO)
public static IAudioSource GetAudioSource(string path, Stream IO, CUEConfig config)
{
string extension = Path.GetExtension(path).ToLower();
string filename = Path.GetFileNameWithoutExtension(path);
string secondExtension = Path.GetExtension(filename).ToLower();
if (secondExtension != ".lossy" && secondExtension != ".lwcdf")
return GetAudioSource(path, IO, extension);
return GetAudioSource(path, IO, extension, config);
string lossyPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lossy" + extension);
string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension);
IAudioSource lossySource = GetAudioSource(lossyPath, null, extension);
IAudioSource lossySource = GetAudioSource(lossyPath, null, extension, config);
IAudioSource lwcdfSource = null;
try
{
lwcdfSource = GetAudioSource(lwcdfPath, null, extension);
lwcdfSource = GetAudioSource(lwcdfPath, null, extension, config);
}
catch
{
@@ -91,6 +93,11 @@ namespace CUETools.Processor
break;
#endif
default:
if (extension == "." + config.udc1Extension && config.udc1Encoder != "")
{
dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, config.udc1Encoder, config.udc1EncParams);
break;
}
throw new Exception("Unsupported audio type: " + path);
}
dest.FinalSampleCount = finalSampleCount;

View File

@@ -99,8 +99,14 @@
<Compile Include="Processor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Tagging.cs" />
<Compile Include="UserDefined.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\taglib-sharp\taglib-sharp.csproj">
<Project>{4CC18776-125E-4318-9D24-D60110AD9697}</Project>
<Name>taglib-sharp</Name>
</ProjectReference>
<ProjectReference Include="..\CUETools.Codecs.ALAC\CUETools.Codecs.ALAC.csproj">
<Project>{F2EC7193-D5E5-4252-9803-5CEB407E910F}</Project>
<Name>CUETools.Codecs.ALAC</Name>

View File

@@ -53,7 +53,8 @@ namespace CUETools.Processor
WavPack,
APE,
TTA,
NoAudio
NoAudio,
UDC1
}
public enum AccurateRipMode
@@ -74,7 +75,7 @@ namespace CUETools.Processor
}
public static class General {
public static string FormatExtension(OutputAudioFormat value)
public static string FormatExtension(OutputAudioFormat value, CUEConfig config)
{
switch (value)
{
@@ -84,6 +85,7 @@ namespace CUETools.Processor
case OutputAudioFormat.TTA: return ".tta";
case OutputAudioFormat.WAV: return ".wav";
case OutputAudioFormat.NoAudio: return ".dummy";
case OutputAudioFormat.UDC1: return "." + config.udc1Extension;
}
return ".wav";
}
@@ -270,6 +272,8 @@ namespace CUETools.Processor
public bool lossyWAVHybrid;
public bool decodeHDCDtoLW16;
public bool decodeHDCDto24bit;
public string udc1Extension, udc1Decoder, udc1Params, udc1Encoder, udc1EncParams;
public bool udc1APEv2;
public CUEConfig()
{
@@ -316,6 +320,9 @@ namespace CUETools.Processor
lossyWAVHybrid = true;
decodeHDCDtoLW16 = false;
decodeHDCDto24bit = true;
udc1Extension = udc1Decoder = udc1Params = udc1Encoder = udc1EncParams = "";
udc1APEv2 = false;
}
public void Save (SettingsWriter sw)
@@ -363,6 +370,15 @@ namespace CUETools.Processor
sw.Save("LossyWAVHybrid", lossyWAVHybrid);
sw.Save("DecodeHDCDToLossyWAV16", decodeHDCDtoLW16);
sw.Save("DecodeHDCDTo24bit", decodeHDCDto24bit);
if (udc1Extension != "")
{
sw.Save("UDC1Extension", udc1Extension);
sw.Save("UDC1Decoder", udc1Decoder);
sw.Save("UDC1Params", udc1Params);
sw.Save("UDC1Encoder", udc1Encoder);
sw.Save("UDC1EncParams", udc1EncParams);
sw.Save("UDC1APEv2", udc1APEv2);
}
}
public void Load(SettingsReader sr)
@@ -410,6 +426,13 @@ namespace CUETools.Processor
lossyWAVHybrid = sr.LoadBoolean("LossyWAVHybrid") ?? true;
decodeHDCDtoLW16 = sr.LoadBoolean("DecodeHDCDToLossyWAV16") ?? false;
decodeHDCDto24bit = sr.LoadBoolean("DecodeHDCDTo24bit") ?? true;
udc1Extension = sr.Load("UDC1Extension") ?? "";
udc1Decoder = sr.Load("UDC1Decoder") ?? "";
udc1Params = sr.Load("UDC1Params") ?? "";
udc1Encoder = sr.Load("UDC1Encoder") ?? "";
udc1EncParams = sr.Load("UDC1EncParams") ?? "";
udc1APEv2 = sr.LoadBoolean("UDC1APEv2") ?? false;
}
public string CleanseString (string s)
@@ -484,7 +507,7 @@ namespace CUETools.Processor
private string _mbReleaseId;
private string _eacLog;
private string _cuePath;
private NameValueCollection _albumTags;
private TagLib.File _fileInfo;
private const int _arOffsetRange = 5 * 588 - 1;
private HDCDDotNet.HDCDDotNet hdcdDecoder;
private bool _outputLossyWAV = false;
@@ -516,7 +539,6 @@ namespace CUETools.Processor
_toc = new CDImageLayout();
_sources = new List<SourceInfo>();
_sourcePaths = new List<string>();
_albumTags = new NameValueCollection();
_stop = false;
_pause = false;
_cuePath = null;
@@ -701,7 +723,7 @@ namespace CUETools.Processor
bool seenFirstFileIndex = false;
List<IndexInfo> indexes = new List<IndexInfo>();
IndexInfo indexInfo;
NameValueCollection _trackTags = null;
TagLib.File _trackFileInfo = null;
TextReader sr;
if (Directory.Exists(pathIn))
@@ -712,6 +734,8 @@ namespace CUETools.Processor
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a", "*.tta" };
for (i = 0; i < audioExts.Length && cueSheet == null; i++)
cueSheet = CUESheet.CreateDummyCUESheet(pathIn, audioExts[i]);
if (_config.udc1Extension != null && cueSheet == null)
cueSheet = CUESheet.CreateDummyCUESheet(pathIn, "*." + _config.udc1Extension);
if (cueSheet == null)
throw new Exception("Input directory doesn't contain supported audio files.");
sr = new StringReader(cueSheet);
@@ -839,7 +863,7 @@ namespace CUETools.Processor
sr = new StreamReader (pathIn, CUESheet.Encoding);
string logPath = Path.ChangeExtension(pathIn, ".log");
if (File.Exists(logPath))
if (System.IO.File.Exists(logPath))
{
StreamReader logReader = new StreamReader(logPath, CUESheet.Encoding);
_eacLog = logReader.ReadToEnd();
@@ -848,7 +872,7 @@ namespace CUETools.Processor
else if (CUEToolsSelection != null)
{
CUEToolsSelectionEventArgs e = new CUEToolsSelectionEventArgs();
e.choices = Directory.GetFiles(cueDir, "*.log");
e.choices = Directory.GetFiles(cueDir == "" ? "." : cueDir, "*.log");
if (e.choices.Length > 0)
{
CUEToolsSelection(this, e);
@@ -862,18 +886,15 @@ namespace CUETools.Processor
}
} else
{
IAudioSource audioSource;
NameValueCollection tags;
string cuesheetTag = null;
audioSource = AudioReadWrite.GetAudioSource(pathIn,null);
tags = audioSource.Tags;
TagLib.File fileInfo;
GetSampleLength(pathIn, out fileInfo);
NameValueCollection tags = Tagging.Analyze(fileInfo);
cuesheetTag = tags.Get("CUESHEET");
_accurateRipId = tags.Get("ACCURATERIPID");
_eacLog = tags.Get("LOG");
if (_eacLog == null) _eacLog = tags.Get("LOGFILE");
if (_eacLog == null) _eacLog = tags.Get("EACLOG");
audioSource.Close();
if (cuesheetTag == null)
throw new Exception("Input file does not contain a .cue sheet.");
sr = new StringReader (cuesheetTag);
@@ -909,8 +930,8 @@ namespace CUETools.Processor
}
_sourcePaths.Add(pathAudio);
absoluteFileStartTime += fileTimeLengthFrames;
NameValueCollection tags;
fileTimeLengthSamples = GetSampleLength(pathAudio, out tags);
TagLib.File fileInfo;
fileTimeLengthSamples = GetSampleLength(pathAudio, out fileInfo);
if ((fileTimeLengthSamples % 588) == 492 && _config.truncate4608ExtraSamples)
{
_truncated4608 = true;
@@ -918,9 +939,9 @@ namespace CUETools.Processor
}
fileTimeLengthFrames = (int)((fileTimeLengthSamples + 587) / 588);
if (_hasEmbeddedCUESheet)
_albumTags = tags;
_fileInfo = fileInfo;
else
_trackTags = tags;
_trackFileInfo = fileInfo;
seenFirstFileIndex = false;
}
}
@@ -947,8 +968,9 @@ namespace CUETools.Processor
seenFirstFileIndex = true;
if (isAudioTrack)
{
if (_tracks.Count > 0 && _trackTags != null && _trackTags.Count != 0)
_tracks[_tracks.Count - 1]._trackTags = _trackTags;
if (_tracks.Count > 0 && _trackFileInfo != null)
_tracks[_tracks.Count - 1]._fileInfo = _trackFileInfo;
_trackFileInfo = null;
sourceInfo.Path = pathAudio;
sourceInfo.Offset = 0;
sourceInfo.Length = (uint)fileTimeLengthSamples;
@@ -1116,30 +1138,46 @@ namespace CUETools.Processor
}
if (!_hasEmbeddedCUESheet && _hasSingleFilename)
{
_albumTags = _tracks[0]._trackTags;
_tracks[0]._trackTags = new NameValueCollection();
_fileInfo = _tracks[0]._fileInfo;
_tracks[0]._fileInfo = null;
}
if (_config.fillUpCUE)
{
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "PERFORMER") == null) && GetCommonTag("ALBUM ARTIST") != null)
General.SetCUELine(_attributes, "PERFORMER", GetCommonTag("ALBUM ARTIST"), true);
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "PERFORMER") == null) && GetCommonTag("ARTIST") != null)
General.SetCUELine(_attributes, "PERFORMER", GetCommonTag("ARTIST"), true);
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "TITLE") == null) && GetCommonTag("ALBUM") != null)
General.SetCUELine(_attributes, "TITLE", GetCommonTag("ALBUM"), true);
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "DATE") == null) && GetCommonTag("DATE") != null)
General.SetCUELine(_attributes, "REM", "DATE", GetCommonTag("DATE"), false);
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "DATE") == null) && GetCommonTag("YEAR") != null)
General.SetCUELine(_attributes, "REM", "DATE", GetCommonTag("YEAR"), false);
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "GENRE") == null) && GetCommonTag("GENRE") != null)
General.SetCUELine(_attributes, "REM", "GENRE", GetCommonTag("GENRE"), true);
if (_config.overwriteCUEData || General.FindCUELine(_attributes, "PERFORMER") == null)
{
string value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.JoinedAlbumArtists; });
if (value == null)
value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.JoinedPerformers; });
if (value != null)
General.SetCUELine(_attributes, "PERFORMER", value, true);
}
if (_config.overwriteCUEData || General.FindCUELine(_attributes, "TITLE") == null)
{
string value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.Album; });
if (value != null)
General.SetCUELine(_attributes, "TITLE", value, true);
}
if (_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "DATE") == null)
{
string value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.Year != 0 ? file.Tag.Year.ToString() : null; });
if (value != null)
General.SetCUELine(_attributes, "REM", "DATE", value, false);
}
if (_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "GENRE") == null)
{
string value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.JoinedGenres; });
if (value != null)
General.SetCUELine(_attributes, "REM", "GENRE", value, true);
}
for (i = 0; i < TrackCount; i++)
{
TrackInfo track = _tracks[i];
string artist = _hasTrackFilenames ? track._trackTags.Get("ARTIST") :
_hasEmbeddedCUESheet ? _albumTags.Get(String.Format("cue_track{0:00}_ARTIST", i + 1)) : null;
string title = _hasTrackFilenames ? track._trackTags.Get("TITLE") :
_hasEmbeddedCUESheet ? _albumTags.Get(String.Format("cue_track{0:00}_TITLE", i + 1)) : null;
string artist = _hasTrackFilenames ? track._fileInfo.Tag.JoinedPerformers :
_hasEmbeddedCUESheet ? Tagging.TagListToSingleValue(Tagging.GetMiscTag(_fileInfo, String.Format("cue_track{0:00}_ARTIST", i + 1))) :
null;
string title = _hasTrackFilenames ? track._fileInfo.Tag.Title :
_hasEmbeddedCUESheet ? Tagging.TagListToSingleValue(Tagging.GetMiscTag(_fileInfo, String.Format("cue_track{0:00}_TITLE", i + 1))) :
null;
if ((_config.overwriteCUEData || track.Artist == "") && artist != null)
track.Artist = artist;
if ((_config.overwriteCUEData || track.Title == "") && title != null)
@@ -1149,10 +1187,11 @@ namespace CUETools.Processor
CUELine cddbDiscIdLine = General.FindCUELine(_attributes, "REM", "DISCID");
_cddbDiscIdTag = cddbDiscIdLine != null && cddbDiscIdLine.Params.Count == 3 ? cddbDiscIdLine.Params[2] : null;
if (_cddbDiscIdTag == null) _cddbDiscIdTag = GetCommonTag("DISCID");
if (_cddbDiscIdTag == null)
_cddbDiscIdTag = GetCommonMiscTag("DISCID");
if (_accurateRipId == null)
_accurateRipId = GetCommonTag("ACCURATERIPID");
_accurateRipId = GetCommonMiscTag("ACCURATERIPID");
if (_accurateRipId == null)
{
@@ -1291,7 +1330,7 @@ namespace CUETools.Processor
}
}
private Stream OpenArchive(string fileName, bool showProgress)
internal Stream OpenArchive(string fileName, bool showProgress)
{
#if !MONO
if (Path.GetExtension(_archivePath).ToLower() == ".rar")
@@ -1305,18 +1344,10 @@ namespace CUETools.Processor
#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;
}
SeekableZipStream zipStream = new SeekableZipStream(_archivePath, fileName);
zipStream.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
if (showProgress)
zipStream.ExtractionProgress += new ExtractionProgressHandler(unrar_ExtractionProgress);
return zipStream;
}
throw new Exception("Unknown archive type.");
@@ -1403,10 +1434,12 @@ namespace CUETools.Processor
}
#endif
public string GetCommonTag(string tagName)
public delegate string GetStringTagProvider(TagLib.File file);
public string GetCommonTag(GetStringTagProvider provider)
{
if (_hasEmbeddedCUESheet || _hasSingleFilename)
return _albumTags.Get(tagName);
return General.EmptyStringToNull(provider(_fileInfo));
if (_hasTrackFilenames)
{
string tagValue = null;
@@ -1414,7 +1447,7 @@ namespace CUETools.Processor
for (int i = 0; i < TrackCount; i++)
{
TrackInfo track = _tracks[i];
string newValue = track._trackTags.Get (tagName);
string newValue = General.EmptyStringToNull(provider(track._fileInfo));
if (tagValue == null)
tagValue = newValue;
else
@@ -1425,6 +1458,11 @@ namespace CUETools.Processor
return null;
}
public string GetCommonMiscTag(string tagName)
{
return GetCommonTag(delegate(TagLib.File file) { return Tagging.TagListToSingleValue(Tagging.GetMiscTag(file, tagName)); });
}
private static string LocateFile(string dir, string file, List<string> contents) {
List<string> dirList, fileList;
string altDir;
@@ -1446,7 +1484,7 @@ namespace CUETools.Processor
for (int iDir = 0; iDir < dirList.Count; iDir++) {
for (int iFile = 0; iFile < fileList.Count; iFile++) {
string path = Path.Combine(dirList[iDir], fileList[iFile]);
if ( (contents == null && File.Exists(path))
if ((contents == null && System.IO.File.Exists(path))
|| (contents != null && contents.Contains(path)))
return path;
path = dirList[iDir] + '/' + fileList[iFile];
@@ -1464,7 +1502,7 @@ namespace CUETools.Processor
_outputFormat = format;
_cuePath = outputPath;
string extension = General.FormatExtension(format);
string extension = General.FormatExtension(format, _config);
List<string> find, replace;
string filename;
int iTrack;
@@ -1551,16 +1589,17 @@ namespace CUETools.Processor
}
}
private int GetSampleLength(string path, out NameValueCollection tags)
private int GetSampleLength(string path, out TagLib.File fileInfo)
{
IAudioSource audioSource;
ShowProgress("Analyzing input file...", 0.0, 0.0, path, null);
if (_isArchive)
audioSource = AudioReadWrite.GetAudioSource(path, OpenArchive(path, true));
else
audioSource = AudioReadWrite.GetAudioSource(path, null);
TagLib.UserDefined.AdditionalFileTypes.Config = _config;
TagLib.File.IFileAbstraction file = _isArchive
? (TagLib.File.IFileAbstraction) new ArchiveFileAbstraction(this, path)
: (TagLib.File.IFileAbstraction) new TagLib.File.LocalFileAbstraction(path);
fileInfo = TagLib.File.Create(file);
IAudioSource audioSource = AudioReadWrite.GetAudioSource(path, _isArchive ? OpenArchive(path, true) : null, _config);
if ((audioSource.BitsPerSample != 16) ||
(audioSource.ChannelCount != 2) ||
(audioSource.SampleRate != 44100) ||
@@ -1569,8 +1608,6 @@ namespace CUETools.Processor
audioSource.Close();
throw new Exception("Audio format is invalid.");
}
tags = audioSource.Tags;
audioSource.Close();
return (int)audioSource.Length;
}
@@ -2021,13 +2058,12 @@ namespace CUETools.Processor
{
string logContents = LOGContents();
string cueContents = CUESheetContents(style);
bool needNewCRCs = _accurateRipMode != AccurateRipMode.None &&
(_accurateRipMode == AccurateRipMode.VerifyAndConvert || _isCD) &&
_config.writeArTagsOnConvert &&
_arVerify.AccResult == HttpStatusCode.OK;
uint tracksMatch = 0;
int bestOffset = 0;
if (needNewCRCs)
if (_accurateRipMode != AccurateRipMode.None &&
_config.writeArTagsOnConvert &&
_arVerify.AccResult == HttpStatusCode.OK)
FindBestOffset(1, true, out tracksMatch, out bestOffset);
if (logContents != null)
@@ -2035,51 +2071,70 @@ namespace CUETools.Processor
else
if (_eacLog != null && _config.extractLog)
WriteText(Path.ChangeExtension(_cuePath, ".log"), _eacLog);
if (style != CUEStyle.SingleFileWithCUE)
if (style == CUEStyle.SingleFileWithCUE || style == CUEStyle.SingleFile)
{
if (style == CUEStyle.SingleFileWithCUE && _config.createCUEFileWhenEmbedded)
WriteText(Path.ChangeExtension(_cuePath, ".cue"), cueContents);
if (style == CUEStyle.SingleFile)
WriteText(_cuePath, cueContents);
#if !MONO
if (needNewCRCs && style != CUEStyle.SingleFile)
if (_outputFormat != OutputAudioFormat.NoAudio)
{
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
NameValueCollection tags = GenerateAlbumTags(bestOffset, style == CUEStyle.SingleFileWithCUE);
TagLib.UserDefined.AdditionalFileTypes.Config = _config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(destPaths[0]));
if (Tagging.UpdateTags(fileInfo, tags, _config))
{
IAudioSource audioSource = AudioReadWrite.GetAudioSource(destPaths[iTrack + (htoaToFile ? 1 : 0)], null);
CleanupTags(audioSource.Tags, "ACCURATERIP");
GenerateAccurateRipTags(audioSource.Tags, 0, bestOffset, iTrack);
audioSource.UpdateTags(false);
audioSource.Close();
audioSource = null;
fileInfo.Tag.DiscCount = (_tracks[0]._fileInfo ?? _fileInfo).Tag.DiscCount; // TODO: GetCommonTag?
fileInfo.Tag.Disc = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Disc;
//fileInfo.Tag.Title = null;
//fileInfo.Tag.Performers = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Performers;
//if (fileInfo.Tag.Performers.Length == 0) fileInfo.Tag.Performers = new string[] { _tracks[iTrack].Artist != "" ? _tracks[iTrack].Artist : Artist };
fileInfo.Tag.AlbumArtists = (_tracks[0]._fileInfo ?? _fileInfo).Tag.AlbumArtists;
if (fileInfo.Tag.AlbumArtists.Length == 0) fileInfo.Tag.AlbumArtists = new string[] { Artist };
fileInfo.Tag.Album = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Album ?? Title;
uint year = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Year;
fileInfo.Tag.Year = year != 0 ? year : ("" != Year && uint.TryParse(Year, out year)) ? year : 0;
fileInfo.Tag.Genres = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Genres;
if (fileInfo.Tag.Genres.Length == 0) fileInfo.Tag.Genres = new string[] { Genre };
fileInfo.Tag.Pictures = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Pictures;
fileInfo.Save();
}
}
#endif
}
else
{
if (_config.createCUEFileWhenEmbedded)
WriteText(Path.ChangeExtension(_cuePath, ".cue"), cueContents);
#if !MONO
if (needNewCRCs || _isCD)
{
IAudioSource audioSource = AudioReadWrite.GetAudioSource(destPaths[0], null);
if (_isCD)
{
if (_accurateRipMode != AccurateRipMode.VerifyThenConvert)
audioSource.Tags.Add("CUESHEET", cueContents);
audioSource.Tags.Add("LOG", logContents);
}
if (needNewCRCs)
{
CleanupTags(audioSource.Tags, "ACCURATERIP");
GenerateAccurateRipTags(audioSource.Tags, 0, bestOffset, -1);
}
audioSource.UpdateTags(false);
audioSource.Close();
audioSource = null;
}
#endif
}
if (style != CUEStyle.SingleFileWithCUE && style != CUEStyle.SingleFile && _config.createM3U)
WriteText(_cuePath, cueContents);
if (_config.createM3U)
WriteText(Path.ChangeExtension(_cuePath, ".m3u"), M3UContents(style));
if (_outputFormat != OutputAudioFormat.NoAudio)
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
{
string path = destPaths[iTrack + (htoaToFile ? 1 : 0)];
NameValueCollection tags = GenerateTrackTags(iTrack, bestOffset);
TagLib.UserDefined.AdditionalFileTypes.Config = _config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path));
if (Tagging.UpdateTags(fileInfo, tags, _config))
{
fileInfo.Tag.TrackCount = (uint) TrackCount;
fileInfo.Tag.Track = (uint) iTrack + 1;
fileInfo.Tag.DiscCount = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.DiscCount;
fileInfo.Tag.Disc = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Disc;
fileInfo.Tag.Title = _tracks[iTrack]._fileInfo != null ? _tracks[iTrack]._fileInfo.Tag.Title : _tracks[iTrack].Title;
fileInfo.Tag.Performers = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Performers;
if (fileInfo.Tag.Performers.Length == 0) fileInfo.Tag.Performers = new string[] { _tracks[iTrack].Artist != "" ? _tracks[iTrack].Artist : Artist };
fileInfo.Tag.AlbumArtists = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.AlbumArtists;
if (fileInfo.Tag.AlbumArtists.Length == 0) fileInfo.Tag.AlbumArtists = new string[] { Artist };
fileInfo.Tag.Album = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Album ?? Title;
uint year = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Year;
fileInfo.Tag.Year = year != 0 ? year : ("" != Year && uint.TryParse(Year, out year)) ? year : 0;
fileInfo.Tag.Genres = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Genres;
if (fileInfo.Tag.Genres.Length == 0) fileInfo.Tag.Genres = new string[] { Genre };
fileInfo.Tag.Pictures = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Pictures;
fileInfo.Save();
}
}
}
}
}
@@ -2095,33 +2150,24 @@ namespace CUETools.Processor
if (_hasEmbeddedCUESheet)
{
IAudioSource audioSource = AudioReadWrite.GetAudioSource(_sourcePaths[0], null);
NameValueCollection tags = audioSource.Tags;
if (_fileInfo is TagLib.Flac.File)
{
NameValueCollection tags = Tagging.Analyze(_fileInfo);
CleanupTags(tags, "ACCURATERIP");
GenerateAccurateRipTags (tags, 0, bestOffset, -1);
#if !MONO
if (audioSource is FLACReader)
audioSource.UpdateTags (true);
#endif
audioSource.Close();
audioSource = null;
GenerateAccurateRipTags(tags, 0, bestOffset, -1);
if (Tagging.UpdateTags(_fileInfo, tags, _config))
_fileInfo.Save();
}
} else if (_hasTrackFilenames)
{
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
if (_tracks[iTrack]._fileInfo is TagLib.Flac.File)
{
string src = _sourcePaths[iTrack + (_hasHTOAFilename ? 1 : 0)];
IAudioSource audioSource = AudioReadWrite.GetAudioSource(src, null);
#if !MONO
if (audioSource is FLACReader)
{
NameValueCollection tags = audioSource.Tags;
NameValueCollection tags = Tagging.Analyze(_tracks[iTrack]._fileInfo);
CleanupTags(tags, "ACCURATERIP");
GenerateAccurateRipTags (tags, 0, bestOffset, iTrack);
audioSource.UpdateTags(true);
}
#endif
audioSource.Close();
audioSource = null;
GenerateAccurateRipTags(tags, 0, bestOffset, iTrack);
if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config))
_tracks[iTrack]._fileInfo.Save();
}
}
}
@@ -2145,76 +2191,74 @@ namespace CUETools.Processor
}
}
private void SetTrackTags(IAudioDest audioDest, int iTrack, int bestOffset)
private NameValueCollection GenerateTrackTags(int iTrack, int bestOffset)
{
NameValueCollection destTags = new NameValueCollection();
if (_hasEmbeddedCUESheet)
{
string trackPrefix = String.Format ("cue_track{0:00}_", iTrack + 1);
string[] keys = _albumTags.AllKeys;
for (int i = 0; i < keys.Length; i++)
string trackPrefix = String.Format("cue_track{0:00}_", iTrack + 1);
NameValueCollection albumTags = Tagging.Analyze(_fileInfo);
foreach (string key in albumTags.AllKeys)
{
if (keys[i].ToLower().StartsWith(trackPrefix)
|| !keys[i].ToLower().StartsWith("cue_track"))
if (key.ToLower().StartsWith(trackPrefix)
|| !key.ToLower().StartsWith("cue_track"))
{
string name = keys[i].ToLower().StartsWith(trackPrefix) ?
keys[i].Substring(trackPrefix.Length) : keys[i];
string[] values = _albumTags.GetValues(keys[i]);
string name = key.ToLower().StartsWith(trackPrefix) ?
key.Substring(trackPrefix.Length) : key;
string[] values = albumTags.GetValues(key);
for (int j = 0; j < values.Length; j++)
destTags.Add(name, values[j]);
}
}
}
else if (_hasTrackFilenames)
destTags.Add(_tracks[iTrack]._trackTags);
destTags.Add(Tagging.Analyze(_tracks[iTrack]._fileInfo));
else if (_hasSingleFilename)
{
// TODO?
}
destTags.Remove("CUESHEET");
// these will be set explicitely
destTags.Remove("ARTIST");
destTags.Remove("TITLE");
destTags.Remove("ALBUM");
destTags.Remove("ALBUMARTIST");
destTags.Remove("DATE");
destTags.Remove("GENRE");
destTags.Remove("TRACKNUMBER");
destTags.Remove("TRACKTOTAL");
destTags.Remove("TOTALTRACKS");
destTags.Remove("DISCNUMBER");
destTags.Remove("DISCTOTAL");
destTags.Remove("TOTALDISCS");
destTags.Remove("LOG");
destTags.Remove("LOGFILE");
destTags.Remove("EACLOG");
// these are not valid
destTags.Remove("CUESHEET");
CleanupTags(destTags, "ACCURATERIP");
CleanupTags(destTags, "REPLAYGAIN");
if (destTags.Get("TITLE") == null && "" != _tracks[iTrack].Title)
destTags.Add("TITLE", _tracks[iTrack].Title);
if (destTags.Get("ARTIST") == null && "" != _tracks[iTrack].Artist)
destTags.Add("ARTIST", _tracks[iTrack].Artist);
if (destTags.Get("ARTIST") == null && "" != Artist)
destTags.Add("ARTIST", Artist);
if (destTags.Get("ALBUM ARTIST") == null && "" != Artist)
destTags.Add("ALBUM ARTIST", Artist);
if (destTags.Get("ALBUM") == null && "" != Title)
destTags.Add("ALBUM", Title);
if (destTags.Get("DATE") == null && "" != Year)
destTags.Add("DATE", Year);
if (destTags.Get("GENRE") == null && "" != Genre)
destTags.Add("GENRE", Genre);
destTags.Add("TRACKNUMBER", (iTrack + 1).ToString("00"));
destTags.Add("TOTALTRACKS", TrackCount.ToString("00"));
if (_config.writeArTagsOnConvert)
{
if (!_isCD && _accurateRipMode == AccurateRipMode.VerifyThenConvert && _arVerify.AccResult == HttpStatusCode.OK)
if (_accurateRipMode != AccurateRipMode.None && _arVerify.AccResult == HttpStatusCode.OK)
GenerateAccurateRipTags(destTags, _writeOffset, bestOffset, iTrack);
else
destTags.Add("ACCURATERIPID", _accurateRipId);
}
audioDest.SetTags(destTags);
return destTags;
}
private void SetAlbumTags(IAudioDest audioDest, int bestOffset, bool fWithCUE)
private NameValueCollection GenerateAlbumTags(int bestOffset, bool fWithCUE)
{
NameValueCollection destTags = new NameValueCollection();
if (_hasEmbeddedCUESheet || _hasSingleFilename)
{
destTags.Add(_albumTags);
destTags.Add(Tagging.Analyze(_fileInfo));
if (!fWithCUE)
CleanupTags(destTags, "CUE_TRACK");
}
@@ -2222,32 +2266,45 @@ namespace CUETools.Processor
{
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
{
string[] keys = _tracks[iTrack]._trackTags.AllKeys;
for (int i = 0; i < keys.Length; i++)
NameValueCollection trackTags = Tagging.Analyze(_tracks[iTrack]._fileInfo);
foreach (string key in trackTags.AllKeys)
{
string singleValue = GetCommonTag (keys[i]);
string singleValue = GetCommonMiscTag(key);
if (singleValue != null)
{
if (destTags.Get(keys[i]) == null)
destTags.Add(keys[i], singleValue);
if (destTags.Get(key) == null)
destTags.Add(key, singleValue);
}
else if (fWithCUE && keys[i].ToUpper() != "TRACKNUMBER")
else if (fWithCUE && key.ToUpper() != "TRACKNUMBER")
{
string[] values = _tracks[iTrack]._trackTags.GetValues(keys[i]);
string[] values = trackTags.GetValues(key);
for (int j = 0; j < values.Length; j++)
destTags.Add(String.Format("cue_track{0:00}_{1}", iTrack + 1, keys[i]), values[j]);
destTags.Add(String.Format("cue_track{0:00}_{1}", iTrack + 1, key), values[j]);
}
}
}
}
destTags.Remove("CUESHEET");
// these will be set explicitely
destTags.Remove("ARTIST");
destTags.Remove("TITLE");
destTags.Remove("ALBUM");
destTags.Remove("ALBUMARTIST");
destTags.Remove("DATE");
destTags.Remove("GENRE");
destTags.Remove("TRACKNUMBER");
destTags.Remove("TRACKTOTAL");
destTags.Remove("TOTALTRACKS");
destTags.Remove("DISCNUMBER");
destTags.Remove("DISCTOTAL");
destTags.Remove("TOTALDISCS");
// these are not valid
CleanupTags(destTags, "ACCURATERIP");
CleanupTags(destTags, "REPLAYGAIN");
if (fWithCUE && (!_isCD || _accurateRipMode == AccurateRipMode.VerifyThenConvert))
destTags.Remove("CUESHEET");
if (fWithCUE)
destTags.Add("CUESHEET", CUESheetContents(CUEStyle.SingleFileWithCUE));
if (_config.embedLog)
@@ -2255,18 +2312,21 @@ namespace CUETools.Processor
destTags.Remove("LOG");
destTags.Remove("LOGFILE");
destTags.Remove("EACLOG");
if (_eacLog != null)
string logContents = LOGContents();
if (logContents != null)
destTags.Add("LOG", logContents);
else if (_eacLog != null)
destTags.Add("LOG", _eacLog);
}
if (_config.writeArTagsOnConvert)
{
if (fWithCUE && !_isCD && _accurateRipMode == AccurateRipMode.VerifyThenConvert && _arVerify.AccResult == HttpStatusCode.OK)
if (fWithCUE && _accurateRipMode != AccurateRipMode.None && _arVerify.AccResult == HttpStatusCode.OK)
GenerateAccurateRipTags(destTags, _writeOffset, bestOffset, -1);
else
destTags.Add("ACCURATERIPID", _accurateRipId);
}
audioDest.SetTags(destTags);
return destTags;
}
public void WriteAudioFilesPass(string dir, CUEStyle style, string[] destPaths, int[] destLengths, bool htoaToFile, bool noOutput)
@@ -2324,11 +2384,6 @@ namespace CUETools.Processor
_appliedWriteOffset = true;
}
uint tracksMatch;
int bestOffset = _writeOffset;
if (!noOutput && _accurateRipMode == AccurateRipMode.VerifyThenConvert && _config.writeArTagsOnConvert && _arVerify.AccResult == HttpStatusCode.OK)
FindBestOffset(1, true, out tracksMatch, out bestOffset);
if (_config.detectHDCD)
{
// currently broken verifyThenConvert on HDCD detection!!!! need to check for HDCD results higher
@@ -2336,13 +2391,10 @@ namespace CUETools.Processor
catch { }
}
if (style == CUEStyle.SingleFile || style == CUEStyle.SingleFileWithCUE)
{
iDest++;
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;
@@ -2371,8 +2423,6 @@ namespace CUETools.Processor
if (audioDest != null)
audioDest.Close();
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[_toc.FirstAudio + iTrack].LastIndex; iIndex++)
@@ -2394,8 +2444,6 @@ namespace CUETools.Processor
audioDest.Close();
iDest++;
audioDest = GetAudioDest(destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, noOutput);
if (!noOutput)
SetTrackTags(audioDest, iTrack, bestOffset);
}
if ((style == CUEStyle.GapsAppended) && (iIndex == 0) && (iTrack == 0))
@@ -2740,9 +2788,9 @@ namespace CUETools.Processor
} else
#endif
if (_isArchive)
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, OpenArchive(sourceInfo.Path, false));
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, OpenArchive(sourceInfo.Path, false), _config);
else
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, null);
audioSource = AudioReadWrite.GetAudioSource(sourceInfo.Path, null, _config);
}
if (sourceInfo.Offset != 0)
@@ -2957,6 +3005,155 @@ namespace CUETools.Processor
}
}
public class SeekableZipStream : Stream
{
ZipFile zipFile;
ZipEntry zipEntry;
Stream zipStream;
long position;
byte[] temp;
public SeekableZipStream(string path, string fileName)
{
zipFile = new ZipFile(path);
zipEntry = zipFile.GetEntry(fileName);
if (zipEntry == null)
throw new Exception("Archive entry not found.");
zipStream = zipFile.GetInputStream(zipEntry);
temp = new byte[65536];
position = 0;
}
public override bool CanRead
{
get { return true; }
}
public override bool CanSeek
{
get { return true; }
}
public override bool CanWrite
{
get { return false; }
}
public override long Length
{
get
{
return zipEntry.Size;
}
}
public override long Position
{
get { return position; }
set { Seek(value, SeekOrigin.Begin); }
}
public override void Close()
{
zipStream.Close();
zipEntry = null;
zipFile.Close();
}
public override void Flush()
{
throw new NotSupportedException();
}
public override void SetLength(long value)
{
throw new NotSupportedException();
}
public override int Read(byte[] buffer, int offset, int count)
{
if (position == 0 && zipEntry.IsCrypted && ((ZipInputStream)zipStream).Password == null && PasswordRequired != null)
{
PasswordRequiredEventArgs e = new PasswordRequiredEventArgs();
PasswordRequired(this, e);
if (e.ContinueOperation && e.Password.Length > 0)
((ZipInputStream)zipStream).Password = e.Password;
}
// TODO: always save to a local temp circular buffer for optimization of the backwards seek.
int total = zipStream.Read(buffer, offset, count);
position += total;
if (ExtractionProgress != null)
{
ExtractionProgressEventArgs e = new ExtractionProgressEventArgs();
e.BytesExtracted = position;
e.FileName = zipEntry.Name;
e.FileSize = zipEntry.Size;
e.PercentComplete = 100.0 * position / zipEntry.Size;
ExtractionProgress(this, e);
}
return total;
}
public override long Seek(long offset, SeekOrigin origin)
{
long seek_to;
switch (origin)
{
case SeekOrigin.Begin:
seek_to = offset;
break;
case SeekOrigin.Current:
seek_to = Position + offset;
break;
case SeekOrigin.End:
seek_to = Length + offset;
break;
default:
throw new NotSupportedException();
}
if (seek_to < 0 || seek_to > Length)
throw new IOException("Invalid seek");
if (seek_to < position)
{
zipStream.Close();
zipStream = zipFile.GetInputStream(zipEntry);
position = 0;
}
while (seek_to > position)
if (Read(temp, 0, (int) Math.Min(seek_to - position, (long) temp.Length)) <= 0)
throw new IOException("Invalid seek");
return position;
}
public override void Write(byte[] array, int offset, int count)
{
throw new NotSupportedException();
}
public event PasswordRequiredHandler PasswordRequired;
public event ExtractionProgressHandler ExtractionProgress;
}
public class ArchiveFileAbstraction : TagLib.File.IFileAbstraction
{
private string name;
private CUESheet _cueSheet;
public ArchiveFileAbstraction(CUESheet cueSheet, string file)
{
name = file;
_cueSheet = cueSheet;
}
public string Name
{
get { return name; }
}
public System.IO.Stream ReadStream
{
get { return _cueSheet.OpenArchive(Name, true); }
}
public System.IO.Stream WriteStream
{
get { return null; }
}
public void CloseStream(System.IO.Stream stream)
{
stream.Close();
}
}
public class CUELine {
private List<String> _params;
private List<bool> _quoted;
@@ -3034,11 +3231,11 @@ namespace CUETools.Processor
public class TrackInfo {
private List<CUELine> _attributes;
public NameValueCollection _trackTags;
public TagLib.File _fileInfo;
public TrackInfo() {
_attributes = new List<CUELine>();
_trackTags = new NameValueCollection();
_fileInfo = null;
}
public List<CUELine> Attributes {

View File

@@ -0,0 +1,178 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
namespace CUETools.Processor
{
public class Tagging
{
public static bool UpdateTags(TagLib.File fileInfo, NameValueCollection tags, CUEConfig config)
{
if (fileInfo is TagLib.Flac.File)
{
TagLib.Ogg.XiphComment xiph = (TagLib.Ogg.XiphComment)fileInfo.GetTag(TagLib.TagTypes.Xiph);
foreach (string tag in tags.AllKeys)
xiph.SetField(tag, tags.GetValues(tag));
return true;
}
if (fileInfo is TagLib.Riff.File)
return false;
if (fileInfo is TagLib.UserDefined.File && !(fileInfo as TagLib.UserDefined.File).SupportsAPEv2)
return false;
TagLib.Ape.Tag ape = (TagLib.Ape.Tag)fileInfo.GetTag(TagLib.TagTypes.Ape, true);
foreach (string tag in tags.AllKeys)
ape.SetValue(XiphTagNameToApe(tag), tags.GetValues(tag));
return true;
}
public static void UpdateTags(string path, NameValueCollection tags, CUEConfig config)
{
TagLib.UserDefined.AdditionalFileTypes.Config = config;
TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path));
if (UpdateTags(fileInfo, tags, config))
fileInfo.Save();
//IAudioSource audioSource = AudioReadWrite.GetAudioSource(path, null, config);
//audioSource.Tags = tags;
//audioSource.UpdateTags(false);
//audioSource.Close();
//audioSource = null;
}
public static string[] GetMiscTag(TagLib.File file, string name)
{
//TagLib.Mpeg4.AppleTag apple = (TagLib.Mpeg4.AppleTag)file.GetTag(TagLib.TagTypes.Apple);
//TagLib.Id3v2.Tag id3v2 = (TagLib.Id3v2.Tag)file.GetTag(TagLib.TagTypes.Id3v2);
TagLib.Ogg.XiphComment xiph = (TagLib.Ogg.XiphComment)file.GetTag(TagLib.TagTypes.Xiph);
TagLib.Ape.Tag ape = (TagLib.Ape.Tag)file.GetTag(TagLib.TagTypes.Ape);
//if (apple != null)
//{
// string[] text = apple.GetText(name);
// if (text.Length != 0)
// return text;
//}
//if (id3v2 != null)
// foreach (TagLib.Id3v2.Frame f in id3v2.GetFrames())
// if (f is TagLib.Id3v2.TextInformationFrame && ((TagLib.Id3v2.TextInformationFrame)f).Text != null)
// return ((TagLib.Id3v2.TextInformationFrame)f).Text;
if (xiph != null)
{
string[] l = xiph.GetField(name);
if (l != null && l.Length != 0)
return l;
}
if (ape != null)
{
TagLib.Ape.Item item = ape.GetItem(name);
if (item != null)
return item.ToStringArray();
}
return null;
}
public static string TagListToSingleValue(string[] list)
{
return list == null ? null :
list.Length == 0 ? null :
list.Length == 1 ? list[0] :
null; // TODO: merge them?
}
public static string ApeTagNameToXiph(string tag)
{
if (tag.ToUpper() == "YEAR")
return "DATE";
if (tag.ToUpper() == "TRACK")
return "TRACKNUMBER";
if (tag.ToUpper() == "DISC")
return "DISCNUMBER";
return tag;
}
public static string XiphTagNameToApe(string tag)
{
if (tag.ToUpper() == "DATE")
return "Year";
if (tag.ToUpper() == "TRACKNUMBER")
return "Track";
if (tag.ToUpper() == "DISCNUMBER")
return "Disc";
return tag;
}
public static NameValueCollection Analyze(string path)
{
return Analyze(new TagLib.File.LocalFileAbstraction(path));
}
public static NameValueCollection Analyze(TagLib.File.IFileAbstraction file)
{
return Analyze(TagLib.File.Create(file));
}
public static NameValueCollection Analyze(TagLib.File fileInfo)
{
NameValueCollection tags = new NameValueCollection();
TagLib.Ogg.XiphComment xiph = (TagLib.Ogg.XiphComment)fileInfo.GetTag(TagLib.TagTypes.Xiph);
TagLib.Ape.Tag ape = (TagLib.Ape.Tag)fileInfo.GetTag(TagLib.TagTypes.Ape);
if (xiph != null)
{
foreach (string tag in xiph)
foreach (string value in xiph.GetField(tag))
tags.Add(tag, value);
}
else if (ape != null)
{
foreach (string tag in ape)
foreach (string value in ape.GetItem(tag).ToStringArray())
tags.Add(ApeTagNameToXiph(tag), value);
}
else
{
//if (audioSource is CUETools.Codecs.ALAC.ALACReader)
//tags = (audioSource as CUETools.Codecs.ALAC.ALACReader).Tags;
}
// TODO: enumerate dash atoms somehow?
//TagLib.Mpeg4.AppleTag apple = (TagLib.Mpeg4.AppleTag)fileInfo.GetTag(TagLib.TagTypes.Apple);
//if (apple != null)
//{
// tags = new NameValueCollection();
// foreach (TagLib.Mpeg4.Box tag in apple)
// if (tag.BoxType == "----")
// foreach (string value in apple.GetDashBox(tag.)
// tags.Add(tag, value);
//}
return tags;
}
//public void SetTextField(TagLib.File file,
// TagLib.ByteVector apple_name, TagLib.ByteVector id3v2_name,
// string xiph_name, string ape_name, string[] values)
//{
// TagLib.Mpeg4.AppleTag apple = (TagLib.Mpeg4.AppleTag)file.GetTag(TagLib.TagTypes.Apple, true);
// TagLib.Id3v2.Tag id3v2 = (TagLib.Id3v2.Tag)file.GetTag(TagLib.TagTypes.Id3v2, true);
// TagLib.Ogg.XiphComment xiph = (TagLib.Ogg.XiphComment)file.GetTag(TagLib.TagTypes.Xiph, true);
// TagLib.Ape.Tag ape = (TagLib.Ape.Tag)file.GetTag(TagLib.TagTypes.Ape, (file is TagLib.Mpc.File));
// if (apple != null)
// apple.SetText(apple_name, values);
// if (id3v2 != null)
// id3v2.SetTextFrame(id3v2_name, new TagLib.StringList(values));
// if (xiph != null)
// xiph.AddFields(xiph_name, values);
// if (ape != null)
// ape.AddValues(ape_name, values, true);
//}
}
}

View File

@@ -0,0 +1,319 @@
//
// File.cs: Provides tagging and properties support for WavPack files.
//
// Author:
// Brian Nickel (brian.nickel@gmail.com)
//
// Original Source:
// wvfile.cpp from libtunepimp
//
// Copyright (C) 2006-2007 Brian Nickel
// Copyright (C) 2006 by Lukáš Lalinský (Original Implementation)
// Copyright (C) 2004 by Allan Sandfeld Jensen (Original Implementation)
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License version
// 2.1 as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
using System;
using TagLib;
namespace TagLib.UserDefined {
/// <summary>
/// This class extends <see cref="TagLib.NonContainer.File" /> to
/// provide tagging and properties support for user defined format files.
/// </summary>
/// <remarks>
/// A <see cref="TagLib.Ape.Tag" /> will be added automatically to
/// any file that doesn't contain one. This change does not effect
/// the file and can be reversed using the following method:
/// <code>file.RemoveTags (file.TagTypes &amp; ~file.TagTypesOnDisk);</code>
/// </remarks>
[SupportedMimeType("taglib/misc", "misc")]
public class File : TagLib.NonContainer.File
{
#region Private Fields
private bool _supportsAPEv2 = true;
#endregion
#region Constructors
/// <summary>
/// Constructs and initializes a new instance of <see
/// cref="File" /> for a specified path in the local file
/// system and specified read style.
/// </summary>
/// <param name="path">
/// A <see cref="string" /> object containing the path of the
/// file to use in the new instance.
/// </param>
/// <param name="propertiesStyle">
/// A <see cref="ReadStyle" /> value specifying at what level
/// of accuracy to read the media properties, or <see
/// cref="ReadStyle.None" /> to ignore the properties.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="path" /> is <see langword="null" />.
/// </exception>
public File (string path, ReadStyle propertiesStyle, bool supportsAPEv2)
: base (path, propertiesStyle)
{
_supportsAPEv2 = supportsAPEv2;
}
/// <summary>
/// Constructs and initializes a new instance of <see
/// cref="File" /> for a specified path in the local file
/// system with an average read style.
/// </summary>
/// <param name="path">
/// A <see cref="string" /> object containing the path of the
/// file to use in the new instance.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="path" /> is <see langword="null" />.
/// </exception>
public File (string path, bool supportsAPEv2) : base (path)
{
_supportsAPEv2 = supportsAPEv2;
}
/// <summary>
/// Constructs and initializes a new instance of <see
/// cref="File" /> for a specified file abstraction and
/// specified read style.
/// </summary>
/// <param name="abstraction">
/// A <see cref="IFileAbstraction" /> object to use when
/// reading from and writing to the file.
/// </param>
/// <param name="propertiesStyle">
/// A <see cref="ReadStyle" /> value specifying at what level
/// of accuracy to read the media properties, or <see
/// cref="ReadStyle.None" /> to ignore the properties.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="abstraction" /> is <see langword="null"
/// />.
/// </exception>
public File (File.IFileAbstraction abstraction,
ReadStyle propertiesStyle, bool supportsAPEv2)
: base (abstraction, propertiesStyle)
{
_supportsAPEv2 = supportsAPEv2;
}
/// <summary>
/// Constructs and initializes a new instance of <see
/// cref="File" /> for a specified file abstraction with an
/// average read style.
/// </summary>
/// <param name="abstraction">
/// A <see cref="IFileAbstraction" /> object to use when
/// reading from and writing to the file.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="abstraction" /> is <see langword="null"
/// />.
/// </exception>
public File (File.IFileAbstraction abstraction, bool supportsAPEv2)
: base (abstraction)
{
_supportsAPEv2 = supportsAPEv2;
}
#endregion
#region Public Methods
public bool SupportsAPEv2
{
get
{
return _supportsAPEv2;
}
}
/// <summary>
/// Gets a tag of a specified type from the current instance,
/// optionally creating a new tag if possible.
/// </summary>
/// <param name="type">
/// A <see cref="TagLib.TagTypes" /> value indicating the
/// type of tag to read.
/// </param>
/// <param name="create">
/// A <see cref="bool" /> value specifying whether or not to
/// try and create the tag if one is not found.
/// </param>
/// <returns>
/// A <see cref="Tag" /> object containing the tag that was
/// found in or added to the current instance. If no
/// matching tag was found and none was created, <see
/// langword="null" /> is returned.
/// </returns>
/// <remarks>
/// If a <see cref="TagLib.Id3v2.Tag" /> is added to the
/// current instance, it will be placed at the start of the
/// file. On the other hand, <see cref="TagLib.Id3v1.Tag" />
/// <see cref="TagLib.Ape.Tag" /> will be added to the end of
/// the file. All other tag types will be ignored.
/// </remarks>
public override TagLib.Tag GetTag (TagTypes type, bool create)
{
Tag t = (Tag as TagLib.NonContainer.Tag).GetTag (type);
if (t != null || !create)
return t;
switch (type)
{
case TagTypes.Id3v1:
return EndTag.AddTag (type, Tag);
case TagTypes.Id3v2:
return StartTag.AddTag (type, Tag);
case TagTypes.Ape:
return EndTag.AddTag (type, Tag);
default:
return null;
}
}
#endregion
#region Protected Methods
/// <summary>
/// Reads format specific information at the start of the
/// file.
/// </summary>
/// <param name="start">
/// A <see cref="long" /> value containing the seek position
/// at which the tags end and the media data begins.
/// </param>
/// <param name="propertiesStyle">
/// A <see cref="ReadStyle" /> value specifying at what level
/// of accuracy to read the media properties, or <see
/// cref="ReadStyle.None" /> to ignore the properties.
/// </param>
protected override void ReadStart (long start,
ReadStyle propertiesStyle)
{
}
/// <summary>
/// Reads format specific information at the end of the
/// file.
/// </summary>
/// <param name="end">
/// A <see cref="long" /> value containing the seek position
/// at which the media data ends and the tags begin.
/// </param>
/// <param name="propertiesStyle">
/// A <see cref="ReadStyle" /> value specifying at what level
/// of accuracy to read the media properties, or <see
/// cref="ReadStyle.None" /> to ignore the properties.
/// </param>
protected override void ReadEnd (long end,
ReadStyle propertiesStyle)
{
// Make sure we have an APE tag.
if (_supportsAPEv2)
GetTag (TagTypes.Ape, true);
}
/// <summary>
/// Reads the audio properties from the file represented by
/// the current instance.
/// </summary>
/// <param name="start">
/// A <see cref="long" /> value containing the seek position
/// at which the tags end and the media data begins.
/// </param>
/// <param name="end">
/// A <see cref="long" /> value containing the seek position
/// at which the media data ends and the tags begin.
/// </param>
/// <param name="propertiesStyle">
/// A <see cref="ReadStyle" /> value specifying at what level
/// of accuracy to read the media properties, or <see
/// cref="ReadStyle.None" /> to ignore the properties.
/// </param>
/// <returns>
/// A <see cref="TagLib.Properties" /> object describing the
/// media properties of the file represented by the current
/// instance.
/// </returns>
protected override Properties ReadProperties (long start,
long end,
ReadStyle propertiesStyle)
{
return new Properties ();
}
#endregion
}
public static class AdditionalFileTypes
{
private static bool inited = false;
private static CUETools.Processor.CUEConfig _config;
public static CUETools.Processor.CUEConfig Config
{
set
{
Init();
_config = value;
}
}
private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style)
{
if (mimetype == "taglib/flac" || mimetype == "taglib/wv" || mimetype == "taglib/ape" || mimetype == "taglib/wav")
return null;
if (mimetype == "taglib/tta")
return new File(abstraction, style, true);
if (mimetype == "taglib/" + _config.udc1Extension)
return new File(abstraction, style, _config.udc1APEv2);
return null;
}
static AdditionalFileTypes ()
{
Init();
}
internal static void Init()
{
if (inited)
return;
TagLib.File.AddFileTypeResolver(new TagLib.File.FileTypeResolver(UserDefinedResolver));
//FileTypes.Register(typeof(TagLib.NonContainer.File));
inited = true;
}
}
}

View File

@@ -23,7 +23,6 @@ using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.IO;
using Bwg.Scsi;
@@ -1069,22 +1068,6 @@ namespace CUETools.Ripper.SCSI
}
}
public NameValueCollection Tags
{
get
{
return null;
}
set
{
}
}
public bool UpdateTags(bool preserveTime)
{
return false;
}
public string Path
{
get

View File

@@ -10,7 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.FLAC", "..\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.APE", "..\CUETools.Codecs.APE\CUETools.Codecs.APE.vcproj", "{9AE965C4-301E-4C01-B90F-297AF341ACC6}"
ProjectSection(ProjectDependencies) = postProject
{CA200BCB-DFC6-4153-9BD4-785BC768B26B} = {CA200BCB-DFC6-4153-9BD4-785BC768B26B}
{0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {0B9C97D4-61B8-4294-A1DF-BA90752A1779}
EndProjectSection
EndProject
@@ -19,7 +18,6 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.WavPack", "..\CUETools.Codecs.WavPack\CUETools.Codecs.WavPack.vcproj", "{CC2E74B6-534A-43D8-9F16-AC03FE955000}"
ProjectSection(ProjectDependencies) = postProject
{5CCCB9CF-0384-458F-BA08-72B73866840F} = {5CCCB9CF-0384-458F-BA08-72B73866840F}
{CA200BCB-DFC6-4153-9BD4-785BC768B26B} = {CA200BCB-DFC6-4153-9BD4-785BC768B26B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MACLib", "..\MAC_SDK\Source\MACLib\MACLib.vcproj", "{0B9C97D4-61B8-4294-A1DF-BA90752A1779}"
@@ -28,8 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodecWrappers", "CodecWrapp
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_static", "..\flac\src\libFLAC\libFLAC_static.vcproj", "{4CEFBC84-C215-11DB-8314-0800200C9A66}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APETagDotNet", "..\APETagDotNet\APETagDotNet.csproj", "{CA200BCB-DFC6-4153-9BD4-785BC768B26B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwavpack", "..\wavpack-4.5.0\src\libwavpack.vcproj", "{5CCCB9CF-0384-458F-BA08-72B73866840F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArCueDotNet", "..\ArCueDotNet\ArCueDotNet.csproj", "{A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}"
@@ -87,6 +83,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.TTA", "..\C
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Converter", "..\CUETools.Converter\CUETools.Converter.csproj", "{115CC5B0-0385-41CD-8A23-6A7EA4C51926}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "taglib-sharp", "..\..\taglib-sharp\taglib-sharp.csproj", "{4CC18776-125E-4318-9D24-D60110AD9697}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -159,18 +157,6 @@ Global
{4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x64.Build.0 = Release|x64
{4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x86.ActiveCfg = Release|Win32
{4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x86.Build.0 = Release|Win32
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|x64.ActiveCfg = Debug|x64
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|x64.Build.0 = Debug|x64
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|x86.ActiveCfg = Debug|x86
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Debug|x86.Build.0 = Debug|x86
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|Any CPU.Build.0 = Release|Any CPU
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|x64.ActiveCfg = Release|x64
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|x64.Build.0 = Release|x64
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|x86.ActiveCfg = Release|x86
{CA200BCB-DFC6-4153-9BD4-785BC768B26B}.Release|x86.Build.0 = Release|x86
{5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Any CPU.ActiveCfg = Debug|x64
{5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x64.ActiveCfg = Debug|x64
{5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x64.Build.0 = Debug|x64
@@ -425,6 +411,18 @@ Global
{115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x64.Build.0 = Release|x64
{115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x86.ActiveCfg = Release|x86
{115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x86.Build.0 = Release|x86
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x64.ActiveCfg = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x64.Build.0 = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x86.ActiveCfg = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x86.Build.0 = Debug|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|Any CPU.Build.0 = Release|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|x64.ActiveCfg = Release|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|x64.Build.0 = Release|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|x86.ActiveCfg = Release|Any CPU
{4CC18776-125E-4318-9D24-D60110AD9697}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -157,7 +157,7 @@ namespace JDP
if (outputAudio)
{
if (_cueStyle == CUEStyle.SingleFileWithCUE)
cueSheet.SingleFilename = Path.ChangeExtension(Path.GetFileName(pathOut), General.FormatExtension(_audioFormat));
cueSheet.SingleFilename = Path.ChangeExtension(Path.GetFileName(pathOut), General.FormatExtension(_audioFormat, _config));
}
cueSheet.UsePregapForFirstTrackInSingleFile = false;

View File

@@ -79,6 +79,7 @@ namespace JDP {
this.rbFreedbAlways = new System.Windows.Forms.RadioButton();
this.rbFreedbIf = new System.Windows.Forms.RadioButton();
this.rbFreedbNever = new System.Windows.Forms.RadioButton();
this.rbUDC1 = new System.Windows.Forms.RadioButton();
this.grpCUEPaths.SuspendLayout();
this.grpOutputStyle.SuspendLayout();
this.grpOutputPathGeneration.SuspendLayout();
@@ -90,125 +91,78 @@ namespace JDP {
//
// btnConvert
//
this.btnConvert.AccessibleDescription = null;
this.btnConvert.AccessibleName = null;
resources.ApplyResources(this.btnConvert, "btnConvert");
this.btnConvert.BackgroundImage = null;
this.btnConvert.Font = null;
this.btnConvert.Name = "btnConvert";
this.toolTip1.SetToolTip(this.btnConvert, resources.GetString("btnConvert.ToolTip"));
this.btnConvert.UseVisualStyleBackColor = true;
this.btnConvert.Click += new System.EventHandler(this.btnConvert_Click);
//
// grpCUEPaths
//
this.grpCUEPaths.AccessibleDescription = null;
this.grpCUEPaths.AccessibleName = null;
resources.ApplyResources(this.grpCUEPaths, "grpCUEPaths");
this.grpCUEPaths.BackgroundImage = null;
this.grpCUEPaths.Controls.Add(this.btnBrowseOutput);
this.grpCUEPaths.Controls.Add(this.btnBrowseInput);
this.grpCUEPaths.Controls.Add(this.lblOutput);
this.grpCUEPaths.Controls.Add(this.lblInput);
this.grpCUEPaths.Controls.Add(this.txtOutputPath);
this.grpCUEPaths.Controls.Add(this.txtInputPath);
this.grpCUEPaths.Font = null;
resources.ApplyResources(this.grpCUEPaths, "grpCUEPaths");
this.grpCUEPaths.Name = "grpCUEPaths";
this.grpCUEPaths.TabStop = false;
this.toolTip1.SetToolTip(this.grpCUEPaths, resources.GetString("grpCUEPaths.ToolTip"));
//
// btnBrowseOutput
//
this.btnBrowseOutput.AccessibleDescription = null;
this.btnBrowseOutput.AccessibleName = null;
resources.ApplyResources(this.btnBrowseOutput, "btnBrowseOutput");
this.btnBrowseOutput.BackgroundImage = null;
this.btnBrowseOutput.Font = null;
this.btnBrowseOutput.Name = "btnBrowseOutput";
this.toolTip1.SetToolTip(this.btnBrowseOutput, resources.GetString("btnBrowseOutput.ToolTip"));
this.btnBrowseOutput.UseVisualStyleBackColor = true;
this.btnBrowseOutput.Click += new System.EventHandler(this.btnBrowseOutput_Click);
//
// btnBrowseInput
//
this.btnBrowseInput.AccessibleDescription = null;
this.btnBrowseInput.AccessibleName = null;
resources.ApplyResources(this.btnBrowseInput, "btnBrowseInput");
this.btnBrowseInput.BackgroundImage = null;
this.btnBrowseInput.Font = null;
this.btnBrowseInput.Name = "btnBrowseInput";
this.toolTip1.SetToolTip(this.btnBrowseInput, resources.GetString("btnBrowseInput.ToolTip"));
this.btnBrowseInput.UseVisualStyleBackColor = true;
this.btnBrowseInput.Click += new System.EventHandler(this.btnBrowseInput_Click);
//
// lblOutput
//
this.lblOutput.AccessibleDescription = null;
this.lblOutput.AccessibleName = null;
resources.ApplyResources(this.lblOutput, "lblOutput");
this.lblOutput.Font = null;
this.lblOutput.Name = "lblOutput";
this.toolTip1.SetToolTip(this.lblOutput, resources.GetString("lblOutput.ToolTip"));
//
// lblInput
//
this.lblInput.AccessibleDescription = null;
this.lblInput.AccessibleName = null;
resources.ApplyResources(this.lblInput, "lblInput");
this.lblInput.Font = null;
this.lblInput.Name = "lblInput";
this.toolTip1.SetToolTip(this.lblInput, resources.GetString("lblInput.ToolTip"));
//
// txtOutputPath
//
this.txtOutputPath.AccessibleDescription = null;
this.txtOutputPath.AccessibleName = null;
this.txtOutputPath.AllowDrop = true;
resources.ApplyResources(this.txtOutputPath, "txtOutputPath");
this.txtOutputPath.BackgroundImage = null;
this.txtOutputPath.Font = null;
this.txtOutputPath.Name = "txtOutputPath";
this.toolTip1.SetToolTip(this.txtOutputPath, resources.GetString("txtOutputPath.ToolTip"));
this.txtOutputPath.DragDrop += new System.Windows.Forms.DragEventHandler(this.PathTextBox_DragDrop);
this.txtOutputPath.DragEnter += new System.Windows.Forms.DragEventHandler(this.PathTextBox_DragEnter);
//
// txtInputPath
//
this.txtInputPath.AccessibleDescription = null;
this.txtInputPath.AccessibleName = null;
this.txtInputPath.AllowDrop = true;
resources.ApplyResources(this.txtInputPath, "txtInputPath");
this.txtInputPath.BackgroundImage = null;
this.txtInputPath.Font = null;
this.txtInputPath.Name = "txtInputPath";
this.toolTip1.SetToolTip(this.txtInputPath, resources.GetString("txtInputPath.ToolTip"));
this.txtInputPath.TextChanged += new System.EventHandler(this.txtInputPath_TextChanged);
this.txtInputPath.DragDrop += new System.Windows.Forms.DragEventHandler(this.PathTextBox_DragDrop);
this.txtInputPath.DragEnter += new System.Windows.Forms.DragEventHandler(this.PathTextBox_DragEnter);
//
// grpOutputStyle
//
this.grpOutputStyle.AccessibleDescription = null;
this.grpOutputStyle.AccessibleName = null;
resources.ApplyResources(this.grpOutputStyle, "grpOutputStyle");
this.grpOutputStyle.BackgroundImage = null;
this.grpOutputStyle.Controls.Add(this.rbEmbedCUE);
this.grpOutputStyle.Controls.Add(this.rbGapsLeftOut);
this.grpOutputStyle.Controls.Add(this.rbGapsPrepended);
this.grpOutputStyle.Controls.Add(this.rbGapsAppended);
this.grpOutputStyle.Controls.Add(this.rbSingleFile);
this.grpOutputStyle.Font = null;
resources.ApplyResources(this.grpOutputStyle, "grpOutputStyle");
this.grpOutputStyle.Name = "grpOutputStyle";
this.grpOutputStyle.TabStop = false;
this.toolTip1.SetToolTip(this.grpOutputStyle, resources.GetString("grpOutputStyle.ToolTip"));
//
// rbEmbedCUE
//
this.rbEmbedCUE.AccessibleDescription = null;
this.rbEmbedCUE.AccessibleName = null;
resources.ApplyResources(this.rbEmbedCUE, "rbEmbedCUE");
this.rbEmbedCUE.BackgroundImage = null;
this.rbEmbedCUE.Font = null;
this.rbEmbedCUE.Name = "rbEmbedCUE";
this.rbEmbedCUE.TabStop = true;
this.toolTip1.SetToolTip(this.rbEmbedCUE, resources.GetString("rbEmbedCUE.ToolTip"));
@@ -217,45 +171,29 @@ namespace JDP {
//
// rbGapsLeftOut
//
this.rbGapsLeftOut.AccessibleDescription = null;
this.rbGapsLeftOut.AccessibleName = null;
resources.ApplyResources(this.rbGapsLeftOut, "rbGapsLeftOut");
this.rbGapsLeftOut.BackgroundImage = null;
this.rbGapsLeftOut.Font = null;
this.rbGapsLeftOut.Name = "rbGapsLeftOut";
this.toolTip1.SetToolTip(this.rbGapsLeftOut, resources.GetString("rbGapsLeftOut.ToolTip"));
this.rbGapsLeftOut.UseVisualStyleBackColor = true;
//
// rbGapsPrepended
//
this.rbGapsPrepended.AccessibleDescription = null;
this.rbGapsPrepended.AccessibleName = null;
resources.ApplyResources(this.rbGapsPrepended, "rbGapsPrepended");
this.rbGapsPrepended.BackgroundImage = null;
this.rbGapsPrepended.Font = null;
this.rbGapsPrepended.Name = "rbGapsPrepended";
this.toolTip1.SetToolTip(this.rbGapsPrepended, resources.GetString("rbGapsPrepended.ToolTip"));
this.rbGapsPrepended.UseVisualStyleBackColor = true;
//
// rbGapsAppended
//
this.rbGapsAppended.AccessibleDescription = null;
this.rbGapsAppended.AccessibleName = null;
resources.ApplyResources(this.rbGapsAppended, "rbGapsAppended");
this.rbGapsAppended.BackgroundImage = null;
this.rbGapsAppended.Font = null;
this.rbGapsAppended.Name = "rbGapsAppended";
this.toolTip1.SetToolTip(this.rbGapsAppended, resources.GetString("rbGapsAppended.ToolTip"));
this.rbGapsAppended.UseVisualStyleBackColor = true;
//
// rbSingleFile
//
this.rbSingleFile.AccessibleDescription = null;
this.rbSingleFile.AccessibleName = null;
resources.ApplyResources(this.rbSingleFile, "rbSingleFile");
this.rbSingleFile.BackgroundImage = null;
this.rbSingleFile.Checked = true;
this.rbSingleFile.Font = null;
this.rbSingleFile.Name = "rbSingleFile";
this.rbSingleFile.TabStop = true;
this.toolTip1.SetToolTip(this.rbSingleFile, resources.GetString("rbSingleFile.ToolTip"));
@@ -263,22 +201,13 @@ namespace JDP {
//
// btnAbout
//
this.btnAbout.AccessibleDescription = null;
this.btnAbout.AccessibleName = null;
resources.ApplyResources(this.btnAbout, "btnAbout");
this.btnAbout.BackgroundImage = null;
this.btnAbout.Font = null;
this.btnAbout.Name = "btnAbout";
this.toolTip1.SetToolTip(this.btnAbout, resources.GetString("btnAbout.ToolTip"));
this.btnAbout.UseVisualStyleBackColor = true;
this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);
//
// grpOutputPathGeneration
//
this.grpOutputPathGeneration.AccessibleDescription = null;
this.grpOutputPathGeneration.AccessibleName = null;
resources.ApplyResources(this.grpOutputPathGeneration, "grpOutputPathGeneration");
this.grpOutputPathGeneration.BackgroundImage = null;
this.grpOutputPathGeneration.Controls.Add(this.txtCustomFormat);
this.grpOutputPathGeneration.Controls.Add(this.rbCustomFormat);
this.grpOutputPathGeneration.Controls.Add(this.txtCreateSubdirectory);
@@ -286,100 +215,61 @@ namespace JDP {
this.grpOutputPathGeneration.Controls.Add(this.rbCreateSubdirectory);
this.grpOutputPathGeneration.Controls.Add(this.rbAppendFilename);
this.grpOutputPathGeneration.Controls.Add(this.txtAppendFilename);
this.grpOutputPathGeneration.Font = null;
resources.ApplyResources(this.grpOutputPathGeneration, "grpOutputPathGeneration");
this.grpOutputPathGeneration.Name = "grpOutputPathGeneration";
this.grpOutputPathGeneration.TabStop = false;
this.toolTip1.SetToolTip(this.grpOutputPathGeneration, resources.GetString("grpOutputPathGeneration.ToolTip"));
//
// txtCustomFormat
//
this.txtCustomFormat.AccessibleDescription = null;
this.txtCustomFormat.AccessibleName = null;
resources.ApplyResources(this.txtCustomFormat, "txtCustomFormat");
this.txtCustomFormat.BackgroundImage = null;
this.txtCustomFormat.Font = null;
this.txtCustomFormat.Name = "txtCustomFormat";
this.toolTip1.SetToolTip(this.txtCustomFormat, resources.GetString("txtCustomFormat.ToolTip"));
this.txtCustomFormat.TextChanged += new System.EventHandler(this.txtCustomFormat_TextChanged);
//
// rbCustomFormat
//
this.rbCustomFormat.AccessibleDescription = null;
this.rbCustomFormat.AccessibleName = null;
resources.ApplyResources(this.rbCustomFormat, "rbCustomFormat");
this.rbCustomFormat.BackgroundImage = null;
this.rbCustomFormat.Font = null;
this.rbCustomFormat.Name = "rbCustomFormat";
this.rbCustomFormat.TabStop = true;
this.toolTip1.SetToolTip(this.rbCustomFormat, resources.GetString("rbCustomFormat.ToolTip"));
this.rbCustomFormat.UseVisualStyleBackColor = true;
this.rbCustomFormat.CheckedChanged += new System.EventHandler(this.rbCustomFormat_CheckedChanged);
//
// txtCreateSubdirectory
//
this.txtCreateSubdirectory.AccessibleDescription = null;
this.txtCreateSubdirectory.AccessibleName = null;
resources.ApplyResources(this.txtCreateSubdirectory, "txtCreateSubdirectory");
this.txtCreateSubdirectory.BackgroundImage = null;
this.txtCreateSubdirectory.Font = null;
this.txtCreateSubdirectory.Name = "txtCreateSubdirectory";
this.toolTip1.SetToolTip(this.txtCreateSubdirectory, resources.GetString("txtCreateSubdirectory.ToolTip"));
this.txtCreateSubdirectory.TextChanged += new System.EventHandler(this.txtCreateSubdirectory_TextChanged);
//
// rbDontGenerate
//
this.rbDontGenerate.AccessibleDescription = null;
this.rbDontGenerate.AccessibleName = null;
resources.ApplyResources(this.rbDontGenerate, "rbDontGenerate");
this.rbDontGenerate.BackgroundImage = null;
this.rbDontGenerate.Font = null;
this.rbDontGenerate.Name = "rbDontGenerate";
this.toolTip1.SetToolTip(this.rbDontGenerate, resources.GetString("rbDontGenerate.ToolTip"));
this.rbDontGenerate.UseVisualStyleBackColor = true;
//
// rbCreateSubdirectory
//
this.rbCreateSubdirectory.AccessibleDescription = null;
this.rbCreateSubdirectory.AccessibleName = null;
resources.ApplyResources(this.rbCreateSubdirectory, "rbCreateSubdirectory");
this.rbCreateSubdirectory.BackgroundImage = null;
this.rbCreateSubdirectory.Checked = true;
this.rbCreateSubdirectory.Font = null;
this.rbCreateSubdirectory.Name = "rbCreateSubdirectory";
this.rbCreateSubdirectory.TabStop = true;
this.toolTip1.SetToolTip(this.rbCreateSubdirectory, resources.GetString("rbCreateSubdirectory.ToolTip"));
this.rbCreateSubdirectory.UseVisualStyleBackColor = true;
this.rbCreateSubdirectory.CheckedChanged += new System.EventHandler(this.rbCreateSubdirectory_CheckedChanged);
//
// rbAppendFilename
//
this.rbAppendFilename.AccessibleDescription = null;
this.rbAppendFilename.AccessibleName = null;
resources.ApplyResources(this.rbAppendFilename, "rbAppendFilename");
this.rbAppendFilename.BackgroundImage = null;
this.rbAppendFilename.Font = null;
this.rbAppendFilename.Name = "rbAppendFilename";
this.toolTip1.SetToolTip(this.rbAppendFilename, resources.GetString("rbAppendFilename.ToolTip"));
this.rbAppendFilename.UseVisualStyleBackColor = true;
this.rbAppendFilename.CheckedChanged += new System.EventHandler(this.rbAppendFilename_CheckedChanged);
//
// txtAppendFilename
//
this.txtAppendFilename.AccessibleDescription = null;
this.txtAppendFilename.AccessibleName = null;
resources.ApplyResources(this.txtAppendFilename, "txtAppendFilename");
this.txtAppendFilename.BackgroundImage = null;
this.txtAppendFilename.Font = null;
this.txtAppendFilename.Name = "txtAppendFilename";
this.toolTip1.SetToolTip(this.txtAppendFilename, resources.GetString("txtAppendFilename.ToolTip"));
this.txtAppendFilename.TextChanged += new System.EventHandler(this.txtAppendFilename_TextChanged);
//
// grpAudioOutput
//
this.grpAudioOutput.AccessibleDescription = null;
this.grpAudioOutput.AccessibleName = null;
resources.ApplyResources(this.grpAudioOutput, "grpAudioOutput");
this.grpAudioOutput.BackgroundImage = null;
this.grpAudioOutput.Controls.Add(this.rbUDC1);
this.grpAudioOutput.Controls.Add(this.rbTTA);
this.grpAudioOutput.Controls.Add(this.chkLossyWAV);
this.grpAudioOutput.Controls.Add(this.rbAPE);
@@ -387,31 +277,21 @@ namespace JDP {
this.grpAudioOutput.Controls.Add(this.rbWavPack);
this.grpAudioOutput.Controls.Add(this.rbWAV);
this.grpAudioOutput.Controls.Add(this.rbFLAC);
this.grpAudioOutput.Font = null;
resources.ApplyResources(this.grpAudioOutput, "grpAudioOutput");
this.grpAudioOutput.Name = "grpAudioOutput";
this.grpAudioOutput.TabStop = false;
this.toolTip1.SetToolTip(this.grpAudioOutput, resources.GetString("grpAudioOutput.ToolTip"));
//
// rbTTA
//
this.rbTTA.AccessibleDescription = null;
this.rbTTA.AccessibleName = null;
resources.ApplyResources(this.rbTTA, "rbTTA");
this.rbTTA.BackgroundImage = null;
this.rbTTA.Font = null;
this.rbTTA.Name = "rbTTA";
this.rbTTA.TabStop = true;
this.toolTip1.SetToolTip(this.rbTTA, resources.GetString("rbTTA.ToolTip"));
this.rbTTA.UseVisualStyleBackColor = true;
this.rbTTA.CheckedChanged += new System.EventHandler(this.rbTTA_CheckedChanged);
//
// chkLossyWAV
//
this.chkLossyWAV.AccessibleDescription = null;
this.chkLossyWAV.AccessibleName = null;
resources.ApplyResources(this.chkLossyWAV, "chkLossyWAV");
this.chkLossyWAV.BackgroundImage = null;
this.chkLossyWAV.Font = null;
this.chkLossyWAV.Name = "chkLossyWAV";
this.toolTip1.SetToolTip(this.chkLossyWAV, resources.GetString("chkLossyWAV.ToolTip"));
this.chkLossyWAV.UseVisualStyleBackColor = true;
@@ -419,24 +299,15 @@ namespace JDP {
//
// rbAPE
//
this.rbAPE.AccessibleDescription = null;
this.rbAPE.AccessibleName = null;
resources.ApplyResources(this.rbAPE, "rbAPE");
this.rbAPE.BackgroundImage = null;
this.rbAPE.Font = null;
this.rbAPE.Name = "rbAPE";
this.rbAPE.TabStop = true;
this.toolTip1.SetToolTip(this.rbAPE, resources.GetString("rbAPE.ToolTip"));
this.rbAPE.UseVisualStyleBackColor = true;
this.rbAPE.CheckedChanged += new System.EventHandler(this.rbAPE_CheckedChanged);
//
// rbNoAudio
//
this.rbNoAudio.AccessibleDescription = null;
this.rbNoAudio.AccessibleName = null;
resources.ApplyResources(this.rbNoAudio, "rbNoAudio");
this.rbNoAudio.BackgroundImage = null;
this.rbNoAudio.Font = null;
this.rbNoAudio.Name = "rbNoAudio";
this.toolTip1.SetToolTip(this.rbNoAudio, resources.GetString("rbNoAudio.ToolTip"));
this.rbNoAudio.UseVisualStyleBackColor = true;
@@ -444,137 +315,85 @@ namespace JDP {
//
// rbWavPack
//
this.rbWavPack.AccessibleDescription = null;
this.rbWavPack.AccessibleName = null;
resources.ApplyResources(this.rbWavPack, "rbWavPack");
this.rbWavPack.BackgroundImage = null;
this.rbWavPack.Font = null;
this.rbWavPack.Name = "rbWavPack";
this.toolTip1.SetToolTip(this.rbWavPack, resources.GetString("rbWavPack.ToolTip"));
this.rbWavPack.UseVisualStyleBackColor = true;
this.rbWavPack.CheckedChanged += new System.EventHandler(this.rbWavPack_CheckedChanged);
//
// rbWAV
//
this.rbWAV.AccessibleDescription = null;
this.rbWAV.AccessibleName = null;
resources.ApplyResources(this.rbWAV, "rbWAV");
this.rbWAV.BackgroundImage = null;
this.rbWAV.Checked = true;
this.rbWAV.Font = null;
this.rbWAV.Name = "rbWAV";
this.rbWAV.TabStop = true;
this.toolTip1.SetToolTip(this.rbWAV, resources.GetString("rbWAV.ToolTip"));
this.rbWAV.UseVisualStyleBackColor = true;
this.rbWAV.CheckedChanged += new System.EventHandler(this.rbWAV_CheckedChanged);
//
// rbFLAC
//
this.rbFLAC.AccessibleDescription = null;
this.rbFLAC.AccessibleName = null;
resources.ApplyResources(this.rbFLAC, "rbFLAC");
this.rbFLAC.BackgroundImage = null;
this.rbFLAC.Font = null;
this.rbFLAC.Name = "rbFLAC";
this.toolTip1.SetToolTip(this.rbFLAC, resources.GetString("rbFLAC.ToolTip"));
this.rbFLAC.UseVisualStyleBackColor = true;
this.rbFLAC.CheckedChanged += new System.EventHandler(this.rbFLAC_CheckedChanged);
//
// btnBatch
//
this.btnBatch.AccessibleDescription = null;
this.btnBatch.AccessibleName = null;
resources.ApplyResources(this.btnBatch, "btnBatch");
this.btnBatch.BackgroundImage = null;
this.btnBatch.Font = null;
this.btnBatch.Name = "btnBatch";
this.toolTip1.SetToolTip(this.btnBatch, resources.GetString("btnBatch.ToolTip"));
this.btnBatch.UseVisualStyleBackColor = true;
this.btnBatch.Click += new System.EventHandler(this.btnBatch_Click);
//
// btnFilenameCorrector
//
this.btnFilenameCorrector.AccessibleDescription = null;
this.btnFilenameCorrector.AccessibleName = null;
resources.ApplyResources(this.btnFilenameCorrector, "btnFilenameCorrector");
this.btnFilenameCorrector.BackgroundImage = null;
this.btnFilenameCorrector.Font = null;
this.btnFilenameCorrector.Name = "btnFilenameCorrector";
this.toolTip1.SetToolTip(this.btnFilenameCorrector, resources.GetString("btnFilenameCorrector.ToolTip"));
this.btnFilenameCorrector.UseVisualStyleBackColor = true;
this.btnFilenameCorrector.Click += new System.EventHandler(this.btnFilenameCorrector_Click);
//
// btnSettings
//
this.btnSettings.AccessibleDescription = null;
this.btnSettings.AccessibleName = null;
resources.ApplyResources(this.btnSettings, "btnSettings");
this.btnSettings.BackgroundImage = null;
this.btnSettings.Font = null;
this.btnSettings.Name = "btnSettings";
this.toolTip1.SetToolTip(this.btnSettings, resources.GetString("btnSettings.ToolTip"));
this.btnSettings.UseVisualStyleBackColor = true;
this.btnSettings.Click += new System.EventHandler(this.btnSettings_Click);
//
// grpAccurateRip
//
this.grpAccurateRip.AccessibleDescription = null;
this.grpAccurateRip.AccessibleName = null;
resources.ApplyResources(this.grpAccurateRip, "grpAccurateRip");
this.grpAccurateRip.BackgroundImage = null;
this.grpAccurateRip.Controls.Add(this.rbArAndEncode);
this.grpAccurateRip.Controls.Add(this.label1);
this.grpAccurateRip.Controls.Add(this.txtDataTrackLength);
this.grpAccurateRip.Controls.Add(this.rbArApplyOffset);
this.grpAccurateRip.Controls.Add(this.rbArVerify);
this.grpAccurateRip.Controls.Add(this.rbArNone);
this.grpAccurateRip.Font = null;
resources.ApplyResources(this.grpAccurateRip, "grpAccurateRip");
this.grpAccurateRip.Name = "grpAccurateRip";
this.grpAccurateRip.TabStop = false;
this.toolTip1.SetToolTip(this.grpAccurateRip, resources.GetString("grpAccurateRip.ToolTip"));
//
// rbArAndEncode
//
this.rbArAndEncode.AccessibleDescription = null;
this.rbArAndEncode.AccessibleName = null;
resources.ApplyResources(this.rbArAndEncode, "rbArAndEncode");
this.rbArAndEncode.BackgroundImage = null;
this.rbArAndEncode.Font = null;
this.rbArAndEncode.Name = "rbArAndEncode";
this.rbArAndEncode.TabStop = true;
this.toolTip1.SetToolTip(this.rbArAndEncode, resources.GetString("rbArAndEncode.ToolTip"));
this.rbArAndEncode.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AccessibleDescription = null;
this.label1.AccessibleName = null;
resources.ApplyResources(this.label1, "label1");
this.label1.Font = null;
this.label1.Name = "label1";
this.toolTip1.SetToolTip(this.label1, resources.GetString("label1.ToolTip"));
//
// txtDataTrackLength
//
this.txtDataTrackLength.AccessibleDescription = null;
this.txtDataTrackLength.AccessibleName = null;
resources.ApplyResources(this.txtDataTrackLength, "txtDataTrackLength");
this.txtDataTrackLength.BackgroundImage = null;
this.txtDataTrackLength.Culture = new System.Globalization.CultureInfo("");
this.txtDataTrackLength.CutCopyMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
this.txtDataTrackLength.Font = null;
this.txtDataTrackLength.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
resources.ApplyResources(this.txtDataTrackLength, "txtDataTrackLength");
this.txtDataTrackLength.Name = "txtDataTrackLength";
this.txtDataTrackLength.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals;
this.toolTip1.SetToolTip(this.txtDataTrackLength, resources.GetString("txtDataTrackLength.ToolTip"));
//
// rbArApplyOffset
//
this.rbArApplyOffset.AccessibleDescription = null;
this.rbArApplyOffset.AccessibleName = null;
resources.ApplyResources(this.rbArApplyOffset, "rbArApplyOffset");
this.rbArApplyOffset.BackgroundImage = null;
this.rbArApplyOffset.Font = null;
this.rbArApplyOffset.Name = "rbArApplyOffset";
this.toolTip1.SetToolTip(this.rbArApplyOffset, resources.GetString("rbArApplyOffset.ToolTip"));
this.rbArApplyOffset.UseVisualStyleBackColor = true;
@@ -582,11 +401,7 @@ namespace JDP {
//
// rbArVerify
//
this.rbArVerify.AccessibleDescription = null;
this.rbArVerify.AccessibleName = null;
resources.ApplyResources(this.rbArVerify, "rbArVerify");
this.rbArVerify.BackgroundImage = null;
this.rbArVerify.Font = null;
this.rbArVerify.Name = "rbArVerify";
this.toolTip1.SetToolTip(this.rbArVerify, resources.GetString("rbArVerify.ToolTip"));
this.rbArVerify.UseVisualStyleBackColor = true;
@@ -594,12 +409,8 @@ namespace JDP {
//
// rbArNone
//
this.rbArNone.AccessibleDescription = null;
this.rbArNone.AccessibleName = null;
resources.ApplyResources(this.rbArNone, "rbArNone");
this.rbArNone.BackgroundImage = null;
this.rbArNone.Checked = true;
this.rbArNone.Font = null;
this.rbArNone.Name = "rbArNone";
this.rbArNone.TabStop = true;
this.toolTip1.SetToolTip(this.rbArNone, resources.GetString("rbArNone.ToolTip"));
@@ -607,44 +418,32 @@ namespace JDP {
//
// statusStrip1
//
this.statusStrip1.AccessibleDescription = null;
this.statusStrip1.AccessibleName = null;
resources.ApplyResources(this.statusStrip1, "statusStrip1");
this.statusStrip1.BackgroundImage = null;
this.statusStrip1.Font = null;
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
this.toolStripProgressBar1,
this.toolStripProgressBar2});
resources.ApplyResources(this.statusStrip1, "statusStrip1");
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.SizingGrip = false;
this.toolTip1.SetToolTip(this.statusStrip1, resources.GetString("statusStrip1.ToolTip"));
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.AccessibleDescription = null;
this.toolStripStatusLabel1.AccessibleName = null;
resources.ApplyResources(this.toolStripStatusLabel1, "toolStripStatusLabel1");
this.toolStripStatusLabel1.BackgroundImage = null;
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
resources.ApplyResources(this.toolStripStatusLabel1, "toolStripStatusLabel1");
this.toolStripStatusLabel1.Spring = true;
//
// toolStripProgressBar1
//
this.toolStripProgressBar1.AccessibleDescription = null;
this.toolStripProgressBar1.AccessibleName = null;
resources.ApplyResources(this.toolStripProgressBar1, "toolStripProgressBar1");
this.toolStripProgressBar1.AutoToolTip = true;
this.toolStripProgressBar1.Name = "toolStripProgressBar1";
resources.ApplyResources(this.toolStripProgressBar1, "toolStripProgressBar1");
this.toolStripProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
//
// toolStripProgressBar2
//
this.toolStripProgressBar2.AccessibleDescription = null;
this.toolStripProgressBar2.AccessibleName = null;
resources.ApplyResources(this.toolStripProgressBar2, "toolStripProgressBar2");
this.toolStripProgressBar2.AutoToolTip = true;
this.toolStripProgressBar2.Name = "toolStripProgressBar2";
resources.ApplyResources(this.toolStripProgressBar2, "toolStripProgressBar2");
this.toolStripProgressBar2.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
//
// toolTip1
@@ -655,109 +454,74 @@ namespace JDP {
//
// btnCUECreator
//
this.btnCUECreator.AccessibleDescription = null;
this.btnCUECreator.AccessibleName = null;
resources.ApplyResources(this.btnCUECreator, "btnCUECreator");
this.btnCUECreator.BackgroundImage = null;
this.btnCUECreator.Font = null;
this.btnCUECreator.Name = "btnCUECreator";
this.toolTip1.SetToolTip(this.btnCUECreator, resources.GetString("btnCUECreator.ToolTip"));
this.btnCUECreator.UseVisualStyleBackColor = true;
this.btnCUECreator.Click += new System.EventHandler(this.btnCUECreator_Click);
//
// btnStop
//
this.btnStop.AccessibleDescription = null;
this.btnStop.AccessibleName = null;
resources.ApplyResources(this.btnStop, "btnStop");
this.btnStop.BackgroundImage = null;
this.btnStop.Font = null;
this.btnStop.Name = "btnStop";
this.toolTip1.SetToolTip(this.btnStop, resources.GetString("btnStop.ToolTip"));
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnPause
//
this.btnPause.AccessibleDescription = null;
this.btnPause.AccessibleName = null;
resources.ApplyResources(this.btnPause, "btnPause");
this.btnPause.BackgroundImage = null;
this.btnPause.Font = null;
this.btnPause.Name = "btnPause";
this.toolTip1.SetToolTip(this.btnPause, resources.GetString("btnPause.ToolTip"));
this.btnPause.UseVisualStyleBackColor = true;
this.btnPause.Click += new System.EventHandler(this.btnPause_Click);
//
// btnResume
//
this.btnResume.AccessibleDescription = null;
this.btnResume.AccessibleName = null;
resources.ApplyResources(this.btnResume, "btnResume");
this.btnResume.BackgroundImage = null;
this.btnResume.Font = null;
this.btnResume.Name = "btnResume";
this.toolTip1.SetToolTip(this.btnResume, resources.GetString("btnResume.ToolTip"));
this.btnResume.UseVisualStyleBackColor = true;
this.btnResume.Click += new System.EventHandler(this.btnPause_Click);
//
// groupBox1
//
this.groupBox1.AccessibleDescription = null;
this.groupBox1.AccessibleName = null;
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.BackgroundImage = null;
this.groupBox1.Controls.Add(this.rbFreedbAlways);
this.groupBox1.Controls.Add(this.rbFreedbIf);
this.groupBox1.Controls.Add(this.rbFreedbNever);
this.groupBox1.Font = null;
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
this.toolTip1.SetToolTip(this.groupBox1, resources.GetString("groupBox1.ToolTip"));
//
// rbFreedbAlways
//
this.rbFreedbAlways.AccessibleDescription = null;
this.rbFreedbAlways.AccessibleName = null;
resources.ApplyResources(this.rbFreedbAlways, "rbFreedbAlways");
this.rbFreedbAlways.BackgroundImage = null;
this.rbFreedbAlways.Font = null;
this.rbFreedbAlways.Name = "rbFreedbAlways";
this.rbFreedbAlways.TabStop = true;
this.toolTip1.SetToolTip(this.rbFreedbAlways, resources.GetString("rbFreedbAlways.ToolTip"));
this.rbFreedbAlways.UseVisualStyleBackColor = true;
//
// rbFreedbIf
//
this.rbFreedbIf.AccessibleDescription = null;
this.rbFreedbIf.AccessibleName = null;
resources.ApplyResources(this.rbFreedbIf, "rbFreedbIf");
this.rbFreedbIf.BackgroundImage = null;
this.rbFreedbIf.Font = null;
this.rbFreedbIf.Name = "rbFreedbIf";
this.rbFreedbIf.TabStop = true;
this.toolTip1.SetToolTip(this.rbFreedbIf, resources.GetString("rbFreedbIf.ToolTip"));
this.rbFreedbIf.UseVisualStyleBackColor = true;
//
// rbFreedbNever
//
this.rbFreedbNever.AccessibleDescription = null;
this.rbFreedbNever.AccessibleName = null;
resources.ApplyResources(this.rbFreedbNever, "rbFreedbNever");
this.rbFreedbNever.BackgroundImage = null;
this.rbFreedbNever.Font = null;
this.rbFreedbNever.Name = "rbFreedbNever";
this.rbFreedbNever.TabStop = true;
this.toolTip1.SetToolTip(this.rbFreedbNever, resources.GetString("rbFreedbNever.ToolTip"));
this.rbFreedbNever.UseVisualStyleBackColor = true;
//
// rbUDC1
//
resources.ApplyResources(this.rbUDC1, "rbUDC1");
this.rbUDC1.Name = "rbUDC1";
this.rbUDC1.TabStop = true;
this.rbUDC1.UseVisualStyleBackColor = true;
this.rbUDC1.CheckedChanged += new System.EventHandler(this.rbUDC1_CheckedChanged);
//
// frmCUETools
//
this.AccessibleDescription = null;
this.AccessibleName = null;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = null;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnResume);
this.Controls.Add(this.btnPause);
@@ -775,10 +539,8 @@ namespace JDP {
this.Controls.Add(this.grpCUEPaths);
this.Controls.Add(this.btnConvert);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = null;
this.MaximizeBox = false;
this.Name = "frmCUETools";
this.toolTip1.SetToolTip(this, resources.GetString("$this.ToolTip"));
this.Load += new System.EventHandler(this.frmCUETools_Load);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmCUETools_FormClosed);
this.grpCUEPaths.ResumeLayout(false);
@@ -856,6 +618,7 @@ namespace JDP {
private System.Windows.Forms.RadioButton rbFreedbAlways;
private System.Windows.Forms.RadioButton rbFreedbIf;
private System.Windows.Forms.RadioButton rbFreedbNever;
private System.Windows.Forms.RadioButton rbUDC1;
}
}

View File

@@ -126,6 +126,7 @@ namespace JDP {
_writeOffset = settingsForm.WriteOffset;
_reducePriority = settingsForm.ReducePriority;
_config = settingsForm.Config;
updateOutputStyles();
UpdateOutputPath();
}
}
@@ -741,7 +742,10 @@ namespace JDP {
if (rbAPE.Checked) return OutputAudioFormat.APE;
if (rbTTA.Checked) return OutputAudioFormat.TTA;
if (rbNoAudio.Checked) return OutputAudioFormat.NoAudio;
return OutputAudioFormat.WAV;
if (rbWAV.Checked) return OutputAudioFormat.WAV;
if (rbUDC1.Checked) return OutputAudioFormat.UDC1;
return OutputAudioFormat.NoAudio;
//throw new Exception("output format invalid");
}
set {
switch (value) {
@@ -751,6 +755,7 @@ namespace JDP {
case OutputAudioFormat.TTA: rbTTA.Checked = true; break;
case OutputAudioFormat.WAV: rbWAV.Checked = true; break;
case OutputAudioFormat.NoAudio: rbNoAudio.Checked = true; break;
case OutputAudioFormat.UDC1: rbUDC1.Checked = true; break;
}
}
}
@@ -859,7 +864,7 @@ namespace JDP {
}
ext = ".cue";
if (rbEmbedCUE.Checked)
ext = General.FormatExtension (SelectedOutputAudioFormat);
ext = General.FormatExtension (SelectedOutputAudioFormat, _config);
if (chkLossyWAV.Checked)
ext = ".lossy" + ext;
if (_config.detectHDCD && _config.decodeHDCD && (!chkLossyWAV.Checked || !_config.decodeHDCDtoLW16))
@@ -901,11 +906,14 @@ namespace JDP {
private void updateOutputStyles()
{
rbEmbedCUE.Enabled = rbFLAC.Checked || rbWavPack.Checked || rbAPE.Checked;
rbEmbedCUE.Enabled = rbFLAC.Checked || rbWavPack.Checked || rbAPE.Checked || (rbUDC1.Checked && _config.udc1APEv2);
chkLossyWAV.Enabled = rbFLAC.Checked || rbWavPack.Checked || rbWAV.Checked;
rbNoAudio.Enabled = !rbEmbedCUE.Checked && !chkLossyWAV.Checked;
rbWAV.Enabled = !rbEmbedCUE.Checked;
rbTTA.Enabled = rbAPE.Enabled = !chkLossyWAV.Checked;
rbUDC1.Enabled = _config.udc1Extension != "" && _config.udc1Encoder != "" && (_config.udc1APEv2 || !rbEmbedCUE.Checked) && !chkLossyWAV.Checked;
rbUDC1.Text = _config.udc1Extension == "" ? "User" : _config.udc1Extension.ToUpper();
// _config.udc1Extension.Substring(0, 1).ToUpper() + _config.udc1Extension.Substring(1);
}
private void rbWAV_CheckedChanged(object sender, EventArgs e)
@@ -1027,6 +1035,12 @@ namespace JDP {
updateOutputStyles();
UpdateOutputPath();
}
private void rbUDC1_CheckedChanged(object sender, EventArgs e)
{
updateOutputStyles();
UpdateOutputPath();
}
}
enum OutputPathGeneration {

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,7 @@ namespace JDP {
System.Windows.Forms.Button btnCancel;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettings));
this.grpGeneral = new System.Windows.Forms.GroupBox();
this.chkOverwriteTags = new System.Windows.Forms.CheckBox();
this.chkExtractLog = new System.Windows.Forms.CheckBox();
this.chkReducePriority = new System.Windows.Forms.CheckBox();
this.chkTruncateExtra4206Samples = new System.Windows.Forms.CheckBox();
@@ -38,12 +39,10 @@ namespace JDP {
this.chkAutoCorrectFilenames = new System.Windows.Forms.CheckBox();
this.chkPreserveHTOA = new System.Windows.Forms.CheckBox();
this.lblWriteOffset = new System.Windows.Forms.Label();
this.grpFLAC = new System.Windows.Forms.GroupBox();
this.numericFLACCompressionLevel = new System.Windows.Forms.NumericUpDown();
this.lblFLACCompressionLevel = new System.Windows.Forms.Label();
this.chkFLACVerify = new System.Windows.Forms.CheckBox();
this.btnOK = new System.Windows.Forms.Button();
this.grpWavPack = new System.Windows.Forms.GroupBox();
this.chkWVStoreMD5 = new System.Windows.Forms.CheckBox();
this.numWVExtraMode = new System.Windows.Forms.NumericUpDown();
this.chkWVExtraMode = new System.Windows.Forms.CheckBox();
@@ -81,7 +80,6 @@ namespace JDP {
this.lblTrackFilenameFormat = new System.Windows.Forms.Label();
this.lblSingleFilenameFormat = new System.Windows.Forms.Label();
this.txtSingleFilenameFormat = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.rbAPEinsane = new System.Windows.Forms.RadioButton();
this.rbAPEextrahigh = new System.Windows.Forms.RadioButton();
this.rbAPEhigh = new System.Windows.Forms.RadioButton();
@@ -93,19 +91,32 @@ namespace JDP {
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chkWriteARLogOnVerify = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.numericLossyWAVQuality = new System.Windows.Forms.NumericUpDown();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.tabPage8 = new System.Windows.Forms.TabPage();
this.label1 = new System.Windows.Forms.Label();
this.numericLossyWAVQuality = new System.Windows.Forms.NumericUpDown();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.grpHDCD = new System.Windows.Forms.GroupBox();
this.chkHDCDDetect = new System.Windows.Forms.CheckBox();
this.chkOverwriteTags = new System.Windows.Forms.CheckBox();
this.tabPage9 = new System.Windows.Forms.TabPage();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textUDC1Extension = new System.Windows.Forms.TextBox();
this.textUDC1Decoder = new System.Windows.Forms.TextBox();
this.textUDC1Params = new System.Windows.Forms.TextBox();
this.textUDC1Encoder = new System.Windows.Forms.TextBox();
this.textUDC1EncParams = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.chkUDC1APEv2 = new System.Windows.Forms.CheckBox();
btnCancel = new System.Windows.Forms.Button();
this.grpGeneral.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit();
this.grpFLAC.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).BeginInit();
this.grpWavPack.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numEncodeWhenPercent)).BeginInit();
@@ -113,16 +124,20 @@ namespace JDP {
((System.ComponentModel.ISupportInitialize)(this.numFixWhenConfidence)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numFixWhenPercent)).BeginInit();
this.grpAudioFilenames.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage5.SuspendLayout();
this.tabPage6.SuspendLayout();
this.tabPage7.SuspendLayout();
this.tabPage8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).BeginInit();
this.tabPage4.SuspendLayout();
this.grpHDCD.SuspendLayout();
this.tabPage9.SuspendLayout();
this.SuspendLayout();
//
// btnCancel
@@ -150,6 +165,12 @@ namespace JDP {
this.grpGeneral.Name = "grpGeneral";
this.grpGeneral.TabStop = false;
//
// chkOverwriteTags
//
resources.ApplyResources(this.chkOverwriteTags, "chkOverwriteTags");
this.chkOverwriteTags.Name = "chkOverwriteTags";
this.chkOverwriteTags.UseVisualStyleBackColor = true;
//
// chkExtractLog
//
resources.ApplyResources(this.chkExtractLog, "chkExtractLog");
@@ -228,15 +249,6 @@ namespace JDP {
resources.ApplyResources(this.lblWriteOffset, "lblWriteOffset");
this.lblWriteOffset.Name = "lblWriteOffset";
//
// grpFLAC
//
this.grpFLAC.Controls.Add(this.numericFLACCompressionLevel);
this.grpFLAC.Controls.Add(this.lblFLACCompressionLevel);
this.grpFLAC.Controls.Add(this.chkFLACVerify);
resources.ApplyResources(this.grpFLAC, "grpFLAC");
this.grpFLAC.Name = "grpFLAC";
this.grpFLAC.TabStop = false;
//
// numericFLACCompressionLevel
//
resources.ApplyResources(this.numericFLACCompressionLevel, "numericFLACCompressionLevel");
@@ -271,19 +283,6 @@ namespace JDP {
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// grpWavPack
//
this.grpWavPack.Controls.Add(this.chkWVStoreMD5);
this.grpWavPack.Controls.Add(this.numWVExtraMode);
this.grpWavPack.Controls.Add(this.chkWVExtraMode);
this.grpWavPack.Controls.Add(this.rbWVVeryHigh);
this.grpWavPack.Controls.Add(this.rbWVHigh);
this.grpWavPack.Controls.Add(this.rbWVNormal);
this.grpWavPack.Controls.Add(this.rbWVFast);
resources.ApplyResources(this.grpWavPack, "grpWavPack");
this.grpWavPack.Name = "grpWavPack";
this.grpWavPack.TabStop = false;
//
// chkWVStoreMD5
//
resources.ApplyResources(this.chkWVStoreMD5, "chkWVStoreMD5");
@@ -610,17 +609,6 @@ namespace JDP {
resources.ApplyResources(this.txtSingleFilenameFormat, "txtSingleFilenameFormat");
this.txtSingleFilenameFormat.Name = "txtSingleFilenameFormat";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.rbAPEinsane);
this.groupBox2.Controls.Add(this.rbAPEextrahigh);
this.groupBox2.Controls.Add(this.rbAPEhigh);
this.groupBox2.Controls.Add(this.rbAPEnormal);
this.groupBox2.Controls.Add(this.rbAPEfast);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// rbAPEinsane
//
resources.ApplyResources(this.rbAPEinsane, "rbAPEinsane");
@@ -703,20 +691,67 @@ namespace JDP {
// tabPage3
//
this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
this.tabPage3.Controls.Add(this.groupBox4);
this.tabPage3.Controls.Add(this.grpWavPack);
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.grpFLAC);
this.tabPage3.Controls.Add(this.tabControl2);
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Name = "tabPage3";
//
// groupBox4
// tabControl2
//
this.groupBox4.Controls.Add(this.numericLossyWAVQuality);
this.groupBox4.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
this.tabControl2.Controls.Add(this.tabPage5);
this.tabControl2.Controls.Add(this.tabPage6);
this.tabControl2.Controls.Add(this.tabPage7);
this.tabControl2.Controls.Add(this.tabPage8);
this.tabControl2.Controls.Add(this.tabPage9);
resources.ApplyResources(this.tabControl2, "tabControl2");
this.tabControl2.Multiline = true;
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
//
// tabPage5
//
this.tabPage5.Controls.Add(this.numericFLACCompressionLevel);
this.tabPage5.Controls.Add(this.lblFLACCompressionLevel);
this.tabPage5.Controls.Add(this.chkFLACVerify);
resources.ApplyResources(this.tabPage5, "tabPage5");
this.tabPage5.Name = "tabPage5";
this.tabPage5.UseVisualStyleBackColor = true;
//
// tabPage6
//
this.tabPage6.Controls.Add(this.chkWVStoreMD5);
this.tabPage6.Controls.Add(this.numWVExtraMode);
this.tabPage6.Controls.Add(this.rbWVFast);
this.tabPage6.Controls.Add(this.chkWVExtraMode);
this.tabPage6.Controls.Add(this.rbWVNormal);
this.tabPage6.Controls.Add(this.rbWVVeryHigh);
this.tabPage6.Controls.Add(this.rbWVHigh);
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Name = "tabPage6";
this.tabPage6.UseVisualStyleBackColor = true;
//
// tabPage7
//
this.tabPage7.Controls.Add(this.rbAPEinsane);
this.tabPage7.Controls.Add(this.rbAPEextrahigh);
this.tabPage7.Controls.Add(this.rbAPEfast);
this.tabPage7.Controls.Add(this.rbAPEhigh);
this.tabPage7.Controls.Add(this.rbAPEnormal);
resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true;
//
// tabPage8
//
this.tabPage8.Controls.Add(this.label1);
this.tabPage8.Controls.Add(this.numericLossyWAVQuality);
resources.ApplyResources(this.tabPage8, "tabPage8");
this.tabPage8.Name = "tabPage8";
this.tabPage8.UseVisualStyleBackColor = true;
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// numericLossyWAVQuality
//
@@ -732,11 +767,6 @@ namespace JDP {
0,
0,
0});
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// tabPage4
//
@@ -763,11 +793,78 @@ namespace JDP {
this.chkHDCDDetect.UseVisualStyleBackColor = true;
this.chkHDCDDetect.CheckedChanged += new System.EventHandler(this.chkHDCDDetect_CheckedChanged);
//
// chkOverwriteTags
// tabPage9
//
resources.ApplyResources(this.chkOverwriteTags, "chkOverwriteTags");
this.chkOverwriteTags.Name = "chkOverwriteTags";
this.chkOverwriteTags.UseVisualStyleBackColor = true;
this.tabPage9.Controls.Add(this.chkUDC1APEv2);
this.tabPage9.Controls.Add(this.label6);
this.tabPage9.Controls.Add(this.label5);
this.tabPage9.Controls.Add(this.textUDC1EncParams);
this.tabPage9.Controls.Add(this.textUDC1Encoder);
this.tabPage9.Controls.Add(this.textUDC1Params);
this.tabPage9.Controls.Add(this.textUDC1Decoder);
this.tabPage9.Controls.Add(this.textUDC1Extension);
this.tabPage9.Controls.Add(this.label4);
this.tabPage9.Controls.Add(this.label3);
this.tabPage9.Controls.Add(this.label2);
resources.ApplyResources(this.tabPage9, "tabPage9");
this.tabPage9.Name = "tabPage9";
this.tabPage9.UseVisualStyleBackColor = true;
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// textUDC1Extension
//
resources.ApplyResources(this.textUDC1Extension, "textUDC1Extension");
this.textUDC1Extension.Name = "textUDC1Extension";
//
// textUDC1Decoder
//
resources.ApplyResources(this.textUDC1Decoder, "textUDC1Decoder");
this.textUDC1Decoder.Name = "textUDC1Decoder";
//
// textUDC1Params
//
resources.ApplyResources(this.textUDC1Params, "textUDC1Params");
this.textUDC1Params.Name = "textUDC1Params";
//
// textUDC1Encoder
//
resources.ApplyResources(this.textUDC1Encoder, "textUDC1Encoder");
this.textUDC1Encoder.Name = "textUDC1Encoder";
//
// textUDC1EncParams
//
resources.ApplyResources(this.textUDC1EncParams, "textUDC1EncParams");
this.textUDC1EncParams.Name = "textUDC1EncParams";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// chkUDC1APEv2
//
resources.ApplyResources(this.chkUDC1APEv2, "chkUDC1APEv2");
this.chkUDC1APEv2.Name = "chkUDC1APEv2";
this.chkUDC1APEv2.UseVisualStyleBackColor = true;
//
// frmSettings
//
@@ -784,17 +881,12 @@ namespace JDP {
this.MinimizeBox = false;
this.Name = "frmSettings";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Load += new System.EventHandler(this.frmSettings_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSettings_FormClosing);
this.grpGeneral.ResumeLayout(false);
this.grpGeneral.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit();
this.grpFLAC.ResumeLayout(false);
this.grpFLAC.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).EndInit();
this.grpWavPack.ResumeLayout(false);
this.grpWavPack.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
@@ -804,21 +896,28 @@ namespace JDP {
((System.ComponentModel.ISupportInitialize)(this.numFixWhenPercent)).EndInit();
this.grpAudioFilenames.ResumeLayout(false);
this.grpAudioFilenames.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.tabControl2.ResumeLayout(false);
this.tabPage5.ResumeLayout(false);
this.tabPage5.PerformLayout();
this.tabPage6.ResumeLayout(false);
this.tabPage6.PerformLayout();
this.tabPage7.ResumeLayout(false);
this.tabPage7.PerformLayout();
this.tabPage8.ResumeLayout(false);
this.tabPage8.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).EndInit();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.grpHDCD.ResumeLayout(false);
this.grpHDCD.PerformLayout();
this.tabPage9.ResumeLayout(false);
this.tabPage9.PerformLayout();
this.ResumeLayout(false);
}
@@ -828,11 +927,9 @@ namespace JDP {
private System.Windows.Forms.GroupBox grpGeneral;
private System.Windows.Forms.CheckBox chkPreserveHTOA;
private System.Windows.Forms.Label lblWriteOffset;
private System.Windows.Forms.GroupBox grpFLAC;
private System.Windows.Forms.Label lblFLACCompressionLevel;
private System.Windows.Forms.CheckBox chkFLACVerify;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.GroupBox grpWavPack;
private System.Windows.Forms.RadioButton rbWVVeryHigh;
private System.Windows.Forms.RadioButton rbWVHigh;
private System.Windows.Forms.RadioButton rbWVNormal;
@@ -868,7 +965,6 @@ namespace JDP {
private System.Windows.Forms.CheckBox chkEmbedLog;
private System.Windows.Forms.CheckBox chkFillUpCUE;
private System.Windows.Forms.CheckBox chkFilenamesANSISafe;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton rbAPEinsane;
private System.Windows.Forms.RadioButton rbAPEextrahigh;
private System.Windows.Forms.RadioButton rbAPEhigh;
@@ -892,13 +988,29 @@ namespace JDP {
private System.Windows.Forms.CheckBox chkCreateCUEFileWhenEmbedded;
private System.Windows.Forms.CheckBox chkTruncateExtra4206Samples;
private System.Windows.Forms.CheckBox chkReducePriority;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.NumericUpDown numericLossyWAVQuality;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox chkHDCDLW16;
private System.Windows.Forms.CheckBox chkHDCD24bit;
private System.Windows.Forms.CheckBox chkExtractLog;
private System.Windows.Forms.CheckBox chkOverwriteTags;
private System.Windows.Forms.TabControl tabControl2;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.TabPage tabPage7;
private System.Windows.Forms.TabPage tabPage8;
private System.Windows.Forms.TabPage tabPage9;
private System.Windows.Forms.TextBox textUDC1Params;
private System.Windows.Forms.TextBox textUDC1Decoder;
private System.Windows.Forms.TextBox textUDC1Extension;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textUDC1EncParams;
private System.Windows.Forms.TextBox textUDC1Encoder;
private System.Windows.Forms.CheckBox chkUDC1APEv2;
}
}

View File

@@ -70,6 +70,12 @@ namespace JDP {
chkHDCD24bit.Checked = _config.decodeHDCDto24bit;
chkOverwriteTags.Checked = _config.overwriteCUEData;
textUDC1Extension.Text = _config.udc1Extension;
textUDC1Decoder.Text = _config.udc1Decoder;
textUDC1Params.Text = _config.udc1Params;
textUDC1Encoder.Text = _config.udc1Encoder;
textUDC1EncParams.Text = _config.udc1EncParams;
chkUDC1APEv2.Checked = _config.udc1APEv2;
EnableDisable();
}
@@ -147,6 +153,13 @@ namespace JDP {
_config.decodeHDCDtoLW16 = chkHDCDLW16.Checked;
_config.decodeHDCDto24bit = chkHDCD24bit.Checked;
_config.overwriteCUEData = chkOverwriteTags.Checked;
_config.udc1Extension = textUDC1Extension.Text;
_config.udc1Decoder = textUDC1Decoder.Text;
_config.udc1Params = textUDC1Params.Text;
_config.udc1Encoder = textUDC1Encoder.Text;
_config.udc1EncParams = textUDC1EncParams.Text;
_config.udc1APEv2 = chkUDC1APEv2.Checked;
}
private void EnableDisable()

View File

@@ -511,7 +511,7 @@
<value>0</value>
</data>
<data name="numericFLACCompressionLevel.Location" type="System.Drawing.Point, System.Drawing">
<value>112, 37</value>
<value>123, 6</value>
</data>
<data name="numericFLACCompressionLevel.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 21</value>
@@ -529,7 +529,7 @@
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericFLACCompressionLevel.Parent" xml:space="preserve">
<value>grpFLAC</value>
<value>tabPage5</value>
</data>
<data name="&gt;&gt;numericFLACCompressionLevel.ZOrder" xml:space="preserve">
<value>0</value>
@@ -538,7 +538,7 @@
<value>True</value>
</data>
<data name="lblFLACCompressionLevel.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 41</value>
<value>6, 8</value>
</data>
<data name="lblFLACCompressionLevel.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 13</value>
@@ -556,7 +556,7 @@
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblFLACCompressionLevel.Parent" xml:space="preserve">
<value>grpFLAC</value>
<value>tabPage5</value>
</data>
<data name="&gt;&gt;lblFLACCompressionLevel.ZOrder" xml:space="preserve">
<value>1</value>
@@ -565,7 +565,7 @@
<value>True</value>
</data>
<data name="chkFLACVerify.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 20</value>
<value>9, 37</value>
</data>
<data name="chkFLACVerify.Size" type="System.Drawing.Size, System.Drawing">
<value>54, 17</value>
@@ -583,35 +583,11 @@
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkFLACVerify.Parent" xml:space="preserve">
<value>grpFLAC</value>
<value>tabPage5</value>
</data>
<data name="&gt;&gt;chkFLACVerify.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="grpFLAC.Location" type="System.Drawing.Point, System.Drawing">
<value>317, 6</value>
</data>
<data name="grpFLAC.Size" type="System.Drawing.Size, System.Drawing">
<value>204, 71</value>
</data>
<data name="grpFLAC.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="grpFLAC.Text" xml:space="preserve">
<value>FLAC</value>
</data>
<data name="&gt;&gt;grpFLAC.Name" xml:space="preserve">
<value>grpFLAC</value>
</data>
<data name="&gt;&gt;grpFLAC.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;grpFLAC.Parent" xml:space="preserve">
<value>tabPage3</value>
</data>
<data name="&gt;&gt;grpFLAC.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>194, 290</value>
</data>
@@ -640,7 +616,7 @@
<value>True</value>
</data>
<data name="chkWVStoreMD5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 114</value>
<value>5, 101</value>
</data>
<data name="chkWVStoreMD5.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 17</value>
@@ -658,13 +634,13 @@
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkWVStoreMD5.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;chkWVStoreMD5.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="numWVExtraMode.Location" type="System.Drawing.Point, System.Drawing">
<value>103, 91</value>
<value>96, 78</value>
</data>
<data name="numWVExtraMode.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 21</value>
@@ -682,7 +658,7 @@
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numWVExtraMode.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;numWVExtraMode.ZOrder" xml:space="preserve">
<value>1</value>
@@ -691,7 +667,7 @@
<value>True</value>
</data>
<data name="chkWVExtraMode.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 92</value>
<value>5, 79</value>
</data>
<data name="chkWVExtraMode.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 17</value>
@@ -709,16 +685,16 @@
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkWVExtraMode.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;chkWVExtraMode.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="rbWVVeryHigh.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbWVVeryHigh.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 70</value>
<value>6, 57</value>
</data>
<data name="rbWVVeryHigh.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 17</value>
@@ -736,16 +712,16 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbWVVeryHigh.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;rbWVVeryHigh.ZOrder" xml:space="preserve">
<value>3</value>
<value>5</value>
</data>
<data name="rbWVHigh.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbWVHigh.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 53</value>
<value>6, 40</value>
</data>
<data name="rbWVHigh.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 17</value>
@@ -763,16 +739,16 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbWVHigh.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;rbWVHigh.ZOrder" xml:space="preserve">
<value>4</value>
<value>6</value>
</data>
<data name="rbWVNormal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbWVNormal.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 36</value>
<value>6, 23</value>
</data>
<data name="rbWVNormal.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 17</value>
@@ -790,16 +766,16 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbWVNormal.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;rbWVNormal.ZOrder" xml:space="preserve">
<value>5</value>
<value>4</value>
</data>
<data name="rbWVFast.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbWVFast.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 19</value>
<value>6, 6</value>
</data>
<data name="rbWVFast.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 17</value>
@@ -817,34 +793,10 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbWVFast.Parent" xml:space="preserve">
<value>grpWavPack</value>
<value>tabPage6</value>
</data>
<data name="&gt;&gt;rbWVFast.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="grpWavPack.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 6</value>
</data>
<data name="grpWavPack.Size" type="System.Drawing.Size, System.Drawing">
<value>146, 148</value>
</data>
<data name="grpWavPack.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="grpWavPack.Text" xml:space="preserve">
<value>WavPack (.wv)</value>
</data>
<data name="&gt;&gt;grpWavPack.Name" xml:space="preserve">
<value>grpWavPack</value>
</data>
<data name="&gt;&gt;grpWavPack.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;grpWavPack.Parent" xml:space="preserve">
<value>tabPage3</value>
</data>
<data name="&gt;&gt;grpWavPack.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="chkEncodeWhenZeroOffset.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -1642,7 +1594,7 @@
<value>True</value>
</data>
<data name="rbAPEinsane.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 88</value>
<value>6, 74</value>
</data>
<data name="rbAPEinsane.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 17</value>
@@ -1660,7 +1612,7 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbAPEinsane.Parent" xml:space="preserve">
<value>groupBox2</value>
<value>tabPage7</value>
</data>
<data name="&gt;&gt;rbAPEinsane.ZOrder" xml:space="preserve">
<value>0</value>
@@ -1669,7 +1621,7 @@
<value>True</value>
</data>
<data name="rbAPEextrahigh.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 71</value>
<value>6, 57</value>
</data>
<data name="rbAPEextrahigh.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 17</value>
@@ -1687,7 +1639,7 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbAPEextrahigh.Parent" xml:space="preserve">
<value>groupBox2</value>
<value>tabPage7</value>
</data>
<data name="&gt;&gt;rbAPEextrahigh.ZOrder" xml:space="preserve">
<value>1</value>
@@ -1696,7 +1648,7 @@
<value>True</value>
</data>
<data name="rbAPEhigh.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 54</value>
<value>6, 40</value>
</data>
<data name="rbAPEhigh.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 17</value>
@@ -1714,16 +1666,16 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbAPEhigh.Parent" xml:space="preserve">
<value>groupBox2</value>
<value>tabPage7</value>
</data>
<data name="&gt;&gt;rbAPEhigh.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="rbAPEnormal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbAPEnormal.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 37</value>
<value>6, 23</value>
</data>
<data name="rbAPEnormal.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 17</value>
@@ -1741,16 +1693,16 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbAPEnormal.Parent" xml:space="preserve">
<value>groupBox2</value>
<value>tabPage7</value>
</data>
<data name="&gt;&gt;rbAPEnormal.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="rbAPEfast.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rbAPEfast.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 20</value>
<value>6, 6</value>
</data>
<data name="rbAPEfast.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 17</value>
@@ -1768,33 +1720,9 @@
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rbAPEfast.Parent" xml:space="preserve">
<value>groupBox2</value>
<value>tabPage7</value>
</data>
<data name="&gt;&gt;rbAPEfast.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>166, 6</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 148</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Monkey's Audio (.ape)</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;groupBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>tabPage3</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
@@ -1908,30 +1836,87 @@
<data name="&gt;&gt;tabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="numericLossyWAVQuality.Location" type="System.Drawing.Point, System.Drawing">
<value>109, 29</value>
<data name="tabPage5.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="numericLossyWAVQuality.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 21</value>
<data name="tabPage5.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="numericLossyWAVQuality.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<data name="tabPage5.Size" type="System.Drawing.Size, System.Drawing">
<value>512, 223</value>
</data>
<data name="numericLossyWAVQuality.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
<value>Right</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Name" xml:space="preserve">
<value>numericLossyWAVQuality</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Parent" xml:space="preserve">
<value>groupBox4</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.ZOrder" xml:space="preserve">
<data name="tabPage5.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="tabPage5.Text" xml:space="preserve">
<value>FLAC</value>
</data>
<data name="&gt;&gt;tabPage5.Name" xml:space="preserve">
<value>tabPage5</value>
</data>
<data name="&gt;&gt;tabPage5.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage5.Parent" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabPage5.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabPage6.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tabPage6.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing">
<value>512, 223</value>
</data>
<data name="tabPage6.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tabPage6.Text" xml:space="preserve">
<value>WavPack</value>
</data>
<data name="&gt;&gt;tabPage6.Name" xml:space="preserve">
<value>tabPage6</value>
</data>
<data name="&gt;&gt;tabPage6.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage6.Parent" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabPage6.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabPage7.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tabPage7.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>512, 223</value>
</data>
<data name="tabPage7.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tabPage7.Text" xml:space="preserve">
<value>Monkey's Audio</value>
</data>
<data name="&gt;&gt;tabPage7.Name" xml:space="preserve">
<value>tabPage7</value>
</data>
<data name="&gt;&gt;tabPage7.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage7.Parent" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabPage7.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@@ -1939,7 +1924,7 @@
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 33</value>
<value>6, 12</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>45, 13</value>
@@ -1957,33 +1942,375 @@
<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>groupBox4</value>
<value>tabPage8</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="numericLossyWAVQuality.Location" type="System.Drawing.Point, System.Drawing">
<value>98, 10</value>
</data>
<data name="numericLossyWAVQuality.Size" type="System.Drawing.Size, System.Drawing">
<value>36, 21</value>
</data>
<data name="numericLossyWAVQuality.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="numericLossyWAVQuality.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
<value>Right</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Name" xml:space="preserve">
<value>numericLossyWAVQuality</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.Parent" xml:space="preserve">
<value>tabPage8</value>
</data>
<data name="&gt;&gt;numericLossyWAVQuality.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="groupBox4.Location" type="System.Drawing.Point, System.Drawing">
<value>321, 87</value>
<data name="tabPage8.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="groupBox4.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 67</value>
<data name="tabPage8.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="groupBox4.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<data name="tabPage8.Size" type="System.Drawing.Size, System.Drawing">
<value>512, 223</value>
</data>
<data name="groupBox4.Text" xml:space="preserve">
<data name="tabPage8.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tabPage8.Text" xml:space="preserve">
<value>LossyWAV</value>
</data>
<data name="&gt;&gt;groupBox4.Name" xml:space="preserve">
<value>groupBox4</value>
<data name="&gt;&gt;tabPage8.Name" xml:space="preserve">
<value>tabPage8</value>
</data>
<data name="&gt;&gt;groupBox4.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;tabPage8.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox4.Parent" xml:space="preserve">
<data name="&gt;&gt;tabPage8.Parent" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabPage8.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="chkUDC1APEv2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkUDC1APEv2.Location" type="System.Drawing.Point, System.Drawing">
<value>162, 8</value>
</data>
<data name="chkUDC1APEv2.Size" type="System.Drawing.Size, System.Drawing">
<value>81, 17</value>
</data>
<data name="chkUDC1APEv2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="chkUDC1APEv2.Text" xml:space="preserve">
<value>APEv2 tags</value>
</data>
<data name="&gt;&gt;chkUDC1APEv2.Name" xml:space="preserve">
<value>chkUDC1APEv2</value>
</data>
<data name="&gt;&gt;chkUDC1APEv2.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chkUDC1APEv2.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;chkUDC1APEv2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 117</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 13</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Parameters</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.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;label6.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;label6.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>6, 90</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>46, 13</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Encoder</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>tabPage9</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="textUDC1EncParams.Location" type="System.Drawing.Point, System.Drawing">
<value>89, 114</value>
</data>
<data name="textUDC1EncParams.Size" type="System.Drawing.Size, System.Drawing">
<value>417, 21</value>
</data>
<data name="textUDC1EncParams.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;textUDC1EncParams.Name" xml:space="preserve">
<value>textUDC1EncParams</value>
</data>
<data name="&gt;&gt;textUDC1EncParams.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;textUDC1EncParams.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;textUDC1EncParams.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="textUDC1Encoder.Location" type="System.Drawing.Point, System.Drawing">
<value>89, 87</value>
</data>
<data name="textUDC1Encoder.Size" type="System.Drawing.Size, System.Drawing">
<value>417, 21</value>
</data>
<data name="textUDC1Encoder.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;textUDC1Encoder.Name" xml:space="preserve">
<value>textUDC1Encoder</value>
</data>
<data name="&gt;&gt;textUDC1Encoder.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;textUDC1Encoder.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;textUDC1Encoder.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="textUDC1Params.Location" type="System.Drawing.Point, System.Drawing">
<value>89, 60</value>
</data>
<data name="textUDC1Params.Size" type="System.Drawing.Size, System.Drawing">
<value>417, 21</value>
</data>
<data name="textUDC1Params.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;textUDC1Params.Name" xml:space="preserve">
<value>textUDC1Params</value>
</data>
<data name="&gt;&gt;textUDC1Params.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;textUDC1Params.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;textUDC1Params.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="textUDC1Decoder.Location" type="System.Drawing.Point, System.Drawing">
<value>89, 33</value>
</data>
<data name="textUDC1Decoder.Size" type="System.Drawing.Size, System.Drawing">
<value>417, 21</value>
</data>
<data name="textUDC1Decoder.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;textUDC1Decoder.Name" xml:space="preserve">
<value>textUDC1Decoder</value>
</data>
<data name="&gt;&gt;textUDC1Decoder.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;textUDC1Decoder.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;textUDC1Decoder.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="textUDC1Extension.Location" type="System.Drawing.Point, System.Drawing">
<value>89, 6</value>
</data>
<data name="textUDC1Extension.Size" type="System.Drawing.Size, System.Drawing">
<value>67, 21</value>
</data>
<data name="textUDC1Extension.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;textUDC1Extension.Name" xml:space="preserve">
<value>textUDC1Extension</value>
</data>
<data name="&gt;&gt;textUDC1Extension.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;textUDC1Extension.Parent" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;textUDC1Extension.ZOrder" xml:space="preserve">
<value>7</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>6, 63</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 13</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Parameters</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>tabPage9</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>8</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>6, 36</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Decoder</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>tabPage9</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 9</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>54, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Extension</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>tabPage9</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="tabPage9.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="tabPage9.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage9.Size" type="System.Drawing.Size, System.Drawing">
<value>512, 223</value>
</data>
<data name="tabPage9.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="tabPage9.Text" xml:space="preserve">
<value>User defined</value>
</data>
<data name="&gt;&gt;tabPage9.Name" xml:space="preserve">
<value>tabPage9</value>
</data>
<data name="&gt;&gt;tabPage9.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage9.Parent" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabPage9.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tabControl2.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 6</value>
</data>
<data name="tabControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>520, 249</value>
</data>
<data name="tabControl2.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;tabControl2.Name" xml:space="preserve">
<value>tabControl2</value>
</data>
<data name="&gt;&gt;tabControl2.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabControl2.Parent" xml:space="preserve">
<value>tabPage3</value>
</data>
<data name="&gt;&gt;groupBox4.ZOrder" xml:space="preserve">
<data name="&gt;&gt;tabControl2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabPage3.Location" type="System.Drawing.Point, System.Drawing">

View File

@@ -120,8 +120,14 @@
<data name="btnCancel.Text" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="grpGeneral.Text" xml:space="preserve">
<value>Общие</value>
<data name="btnCancel.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkOverwriteTags.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkExtractLog.ToolTip" xml:space="preserve">
<value />
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkReducePriority.Size" type="System.Drawing.Size, System.Drawing">
@@ -130,6 +136,9 @@
<data name="chkReducePriority.Text" xml:space="preserve">
<value>Понизить приоритет процесса</value>
</data>
<data name="chkReducePriority.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkTruncateExtra4206Samples.Size" type="System.Drawing.Size, System.Drawing">
<value>202, 17</value>
</data>
@@ -145,18 +154,27 @@
<data name="chkCreateCUEFileWhenEmbedded.Text" xml:space="preserve">
<value>Создавать .cue даже при встраивании</value>
</data>
<data name="chkCreateCUEFileWhenEmbedded.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkCreateM3U.Size" type="System.Drawing.Size, System.Drawing">
<value>166, 17</value>
</data>
<data name="chkCreateM3U.Text" xml:space="preserve">
<value>Создавать плейлисты .m3u</value>
</data>
<data name="chkCreateM3U.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkFillUpCUE.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 17</value>
</data>
<data name="chkFillUpCUE.Text" xml:space="preserve">
<value>Пополнить .cue информацией из тэгов</value>
</data>
<data name="chkFillUpCUE.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkEmbedLog.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 17</value>
</data>
@@ -166,6 +184,9 @@
<data name="chkEmbedLog.ToolTip" xml:space="preserve">
<value>Работает, если .log лежит в той же папке и имеет то же имя, что и исходный файл</value>
</data>
<data name="numericWriteOffset.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkAutoCorrectFilenames.Size" type="System.Drawing.Size, System.Drawing">
<value>213, 17</value>
</data>
@@ -181,68 +202,98 @@
<data name="chkPreserveHTOA.Text" xml:space="preserve">
<value>Сохранять HTOA при разбивке на треки</value>
</data>
<data name="chkPreserveHTOA.ToolTip" xml:space="preserve">
<value />
</data>
<data name="lblWriteOffset.Size" type="System.Drawing.Size, System.Drawing">
<value>114, 13</value>
</data>
<data name="lblWriteOffset.Text" xml:space="preserve">
<value>Смещение (сэмплов):</value>
</data>
<data name="numericFLACCompressionLevel.Location" type="System.Drawing.Point, System.Drawing">
<value>113, 44</value>
<data name="lblWriteOffset.ToolTip" xml:space="preserve">
<value />
</data>
<data name="lblFLACCompressionLevel.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 46</value>
<data name="grpGeneral.Text" xml:space="preserve">
<value>Общие</value>
</data>
<data name="lblFLACCompressionLevel.Size" type="System.Drawing.Size, System.Drawing">
<value>94, 13</value>
<data name="grpGeneral.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numericFLACCompressionLevel.ToolTip" xml:space="preserve">
<value />
</data>
<data name="lblFLACCompressionLevel.Text" xml:space="preserve">
<value>Уровень сжатия:</value>
</data>
<data name="chkFLACVerify.Size" type="System.Drawing.Size, System.Drawing">
<value>94, 17</value>
<data name="lblFLACCompressionLevel.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkFLACVerify.Text" xml:space="preserve">
<value>Верификация</value>
</data>
<data name="chkFLACVerify.ToolTip" xml:space="preserve">
<value />
</data>
<data name="btnOK.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkWVStoreMD5.Size" type="System.Drawing.Size, System.Drawing">
<value>119, 17</value>
</data>
<data name="chkWVStoreMD5.Text" xml:space="preserve">
<value>MD5-хеширование</value>
</data>
<data name="chkWVStoreMD5.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numWVExtraMode.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkWVExtraMode.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 17</value>
</data>
<data name="chkWVExtraMode.Text" xml:space="preserve">
<value>Доп. режим:</value>
</data>
<data name="chkWVExtraMode.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbWVVeryHigh.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 17</value>
</data>
<data name="rbWVVeryHigh.Text" xml:space="preserve">
<value>Очень высокий</value>
</data>
<data name="rbWVVeryHigh.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbWVHigh.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 17</value>
</data>
<data name="rbWVHigh.Text" xml:space="preserve">
<value>Высокий</value>
</data>
<data name="rbWVHigh.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbWVNormal.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 17</value>
</data>
<data name="rbWVNormal.Text" xml:space="preserve">
<value>Средний</value>
</data>
<data name="rbWVNormal.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbWVFast.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 17</value>
</data>
<data name="rbWVFast.Text" xml:space="preserve">
<value>Быстрый</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Проверить и записать</value>
<data name="rbWVFast.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkEncodeWhenZeroOffset.Location" type="System.Drawing.Point, System.Drawing">
<value>150, 77</value>
@@ -253,6 +304,9 @@
<data name="chkEncodeWhenZeroOffset.Text" xml:space="preserve">
<value>и нулевым смещением</value>
</data>
<data name="chkEncodeWhenZeroOffset.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkArFixOffset.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 100</value>
</data>
@@ -262,6 +316,9 @@
<data name="chkArFixOffset.Text" xml:space="preserve">
<value>Исправлять смещение если</value>
</data>
<data name="chkArFixOffset.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkWriteArLogOnConvert.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 181</value>
</data>
@@ -271,6 +328,9 @@
<data name="chkWriteArLogOnConvert.Text" xml:space="preserve">
<value>Записывать отчет AccurateRip</value>
</data>
<data name="chkWriteArLogOnConvert.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkWriteArTagsOnConvert.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 164</value>
</data>
@@ -292,9 +352,15 @@
<data name="labelEncodeWhenPercent.Text" xml:space="preserve">
<value>% проверенных треков &gt;=</value>
</data>
<data name="labelEncodeWhenPercent.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numEncodeWhenPercent.Location" type="System.Drawing.Point, System.Drawing">
<value>250, 35</value>
</data>
<data name="numEncodeWhenPercent.ToolTip" xml:space="preserve">
<value />
</data>
<data name="labelEncodeWhenConfidence.Location" type="System.Drawing.Point, System.Drawing">
<value>125, 58</value>
</data>
@@ -304,15 +370,24 @@
<data name="labelEncodeWhenConfidence.Text" xml:space="preserve">
<value>с достоверностью &gt;=</value>
</data>
<data name="labelEncodeWhenConfidence.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numEncodeWhenConfidence.Location" type="System.Drawing.Point, System.Drawing">
<value>250, 56</value>
</data>
<data name="numEncodeWhenConfidence.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkArNoUnverifiedAudio.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 17</value>
</data>
<data name="chkArNoUnverifiedAudio.Text" xml:space="preserve">
<value>Конвертировать только если</value>
</data>
<data name="chkArNoUnverifiedAudio.ToolTip" xml:space="preserve">
<value />
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelFixWhenConfidence.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -330,9 +405,15 @@
<data name="labelFixWhenConfidence.Text" xml:space="preserve">
<value>с достоверностью &gt;=</value>
</data>
<data name="labelFixWhenConfidence.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numFixWhenConfidence.Location" type="System.Drawing.Point, System.Drawing">
<value>251, 137</value>
</data>
<data name="numFixWhenConfidence.ToolTip" xml:space="preserve">
<value />
</data>
<data name="labelFixWhenPercent.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
@@ -348,9 +429,21 @@
<data name="labelFixWhenPercent.Text" xml:space="preserve">
<value>% проверенных треков &gt;=</value>
</data>
<data name="labelFixWhenPercent.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numFixWhenPercent.Location" type="System.Drawing.Point, System.Drawing">
<value>250, 116</value>
</data>
<data name="numFixWhenPercent.ToolTip" xml:space="preserve">
<value />
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Проверить и записать</value>
</data>
<data name="groupBox1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkFilenamesANSISafe.Size" type="System.Drawing.Size, System.Drawing">
<value>207, 17</value>
</data>
@@ -408,27 +501,39 @@
<data name="chkHDCDLW16.ToolTip" xml:space="preserve">
<value>При конвертации в lossyWAV, обрезать до 16 бит</value>
</data>
<data name="grpAudioFilenames.Text" xml:space="preserve">
<value>Имена аудиофайлов</value>
</data>
<data name="chkKeepOriginalFilenames.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 17</value>
</data>
<data name="chkKeepOriginalFilenames.Text" xml:space="preserve">
<value>Сохранять оригинальные</value>
</data>
<data name="chkKeepOriginalFilenames.ToolTip" xml:space="preserve">
<value />
</data>
<data name="txtSpecialExceptions.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkRemoveSpecial.Size" type="System.Drawing.Size, System.Drawing">
<value>223, 17</value>
</data>
<data name="chkRemoveSpecial.Text" xml:space="preserve">
<value>Удалять специальные символы кроме:</value>
</data>
<data name="chkRemoveSpecial.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkReplaceSpaces.Size" type="System.Drawing.Size, System.Drawing">
<value>209, 17</value>
</data>
<data name="chkReplaceSpaces.Text" xml:space="preserve">
<value>Заменять пробелы подчеркиванями</value>
</data>
<data name="chkReplaceSpaces.ToolTip" xml:space="preserve">
<value />
</data>
<data name="txtTrackFilenameFormat.ToolTip" xml:space="preserve">
<value />
</data>
<data name="lblTrackFilenameFormat.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 75</value>
</data>
@@ -438,26 +543,44 @@
<data name="lblTrackFilenameFormat.Text" xml:space="preserve">
<value>Трек:</value>
</data>
<data name="lblTrackFilenameFormat.ToolTip" xml:space="preserve">
<value />
</data>
<data name="lblSingleFilenameFormat.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 13</value>
</data>
<data name="lblSingleFilenameFormat.Text" xml:space="preserve">
<value>Образ диска:</value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value>Форматы</value>
<data name="lblSingleFilenameFormat.ToolTip" xml:space="preserve">
<value />
</data>
<data name="grpHDCD.Text" xml:space="preserve">
<value>Параметры</value>
<data name="txtSingleFilenameFormat.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkHDCDDetect.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 17</value>
<data name="grpAudioFilenames.Text" xml:space="preserve">
<value>Имена аудиофайлов</value>
</data>
<data name="chkHDCDDetect.Text" xml:space="preserve">
<value>Определять HDCD</value>
<data name="grpAudioFilenames.ToolTip" xml:space="preserve">
<value />
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>При проверке</value>
<data name="rbAPEinsane.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbAPEextrahigh.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbAPEhigh.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbAPEnormal.ToolTip" xml:space="preserve">
<value />
</data>
<data name="rbAPEfast.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkWriteARLogOnVerify.Location" type="System.Drawing.Point, System.Drawing">
<value>5, 181</value>
@@ -468,13 +591,76 @@
<data name="chkWriteARLogOnVerify.Text" xml:space="preserve">
<value>Записывать отчет AccurateRip</value>
</data>
<data name="chkWriteARLogOnVerify.ToolTip" xml:space="preserve">
<value />
</data>
<data name="groupBox3.Text" xml:space="preserve">
<value>При проверке</value>
</data>
<data name="groupBox3.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage2.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage5.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage6.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage7.ToolTip" xml:space="preserve">
<value />
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Качество:</value>
</data>
<data name="label1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="numericLossyWAVQuality.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage8.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabControl2.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value>Форматы</value>
</data>
<data name="tabPage3.ToolTip" xml:space="preserve">
<value />
</data>
<data name="grpHDCD.Text" xml:space="preserve">
<value>Параметры</value>
</data>
<data name="grpHDCD.ToolTip" xml:space="preserve">
<value />
</data>
<data name="chkHDCDDetect.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 17</value>
</data>
<data name="chkHDCDDetect.Text" xml:space="preserve">
<value>Определять HDCD</value>
</data>
<data name="chkHDCDDetect.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabPage4.ToolTip" xml:space="preserve">
<value />
</data>
<data name="tabControl1.ToolTip" xml:space="preserve">
<value />
</data>
<data name="$this.Text" xml:space="preserve">
<value>Продвинутые настройки</value>
</data>
<data name="$this.ToolTip" xml:space="preserve">
<value />
</data>
</root>

View File

@@ -36,7 +36,7 @@
static void progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data);
#define READSIZE 1024
#define READSIZE 0x4000
static unsigned total_samples = 0; /* can use a 32-bit number due to WAVE size limitations */
static FLAC__byte buffer[READSIZE/*samples*/ * 2/*bytes_per_sample*/ * 2/*channels*/]; /* we read the WAVE data into here */
@@ -140,7 +140,11 @@ int main(int argc, char *argv[])
pcm[i] = (FLAC__int32)(((FLAC__int16)(FLAC__int8)buffer[2*i+1] << 8) | (FLAC__int16)buffer[2*i]);
}
/* feed samples to encoder */
ok = FLAC__stream_encoder_process_interleaved(encoder, pcm, need);
if (!FLAC__stream_encoder_process_interleaved(encoder, pcm, need))
{
fprintf(stderr, "ERROR: encode\n");
ok = false;
}
}
left -= need;
}
@@ -166,7 +170,7 @@ void progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_wr
(void)encoder, (void)client_data;
#ifdef _MSC_VER
fprintf(stderr, "wrote %I64u bytes, %I64u/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
//fprintf(stderr, "wrote %I64u bytes, %I64u/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
#else
fprintf(stderr, "wrote %llu bytes, %llu/%u samples, %u/%u frames\n", bytes_written, samples_written, total_samples, frames_written, total_frames_estimate);
#endif

View File

@@ -108,7 +108,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\include;..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__CPU_IA64;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\&quot;1.2.0\&quot;;FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__CPU_IA64_NOT;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\&quot;1.2.0\&quot;;FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT"
MinimalRebuild="false"
ExceptionHandling="2"
BasicRuntimeChecks="0"
@@ -292,11 +292,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\include\protected\all.h"
RelativePath=".\include\private\all.h"
>
</File>
<File
RelativePath=".\include\private\all.h"
RelativePath=".\include\protected\all.h"
>
</File>
<File
@@ -748,52 +748,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\ia64\lpc_asm.nasm"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\ia32\lpc_asm.nasm"
>
@@ -840,6 +794,52 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\ia64\lpc_asm.nasm"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj&#x0D;&#x0A;"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj&#x0D;&#x0A;"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj&#x0D;&#x0A;"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj&#x0D;&#x0A;"
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
Outputs="ia64/lpc_asm.obj"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\ia32\stream_encoder_asm.nasm"
>