CUETools flac and alac encoders write 'CUETools 2.1.5' in "tool" metadata

instad of "Flake#0.1" etc
This commit is contained in:
Grigory Chudov
2013-04-28 14:33:48 -04:00
parent 642cc3fff6
commit 8dd7cfe136
5 changed files with 40 additions and 13 deletions

View File

@@ -1726,7 +1726,7 @@ namespace CUETools.Codecs.FLACCL
OCLMan.Defines =
"#define MAX_ORDER " + eparams.max_prediction_order.ToString() + "\n" +
"#define GROUP_SIZE " + groupSize.ToString() + "\n" +
"#define FLACCL_VERSION \"" + vendor_string + "\"\n" +
"#define FLACCL_VERSION \"" + Vendor + "\"\n" +
(UseGPUOnly ? "#define DO_PARTITIONS\n" : "") +
(UseGPURice ? "#define DO_RICE\n" : "") +
"#define BITS_PER_SAMPLE " + Settings.PCM.BitsPerSample + "\n" +
@@ -1940,7 +1940,20 @@ namespace CUETools.Codecs.FLACCL
public string Path { get { return _path; } }
public static readonly string vendor_string = "FLACCL#0.4";
public static string Vendor
{
get
{
var version = typeof(FLACCLWriter).Assembly.GetName().Version;
return vendor_string ?? "CUETools FLACCL " + version.Major + "." + version.Minor + "." + version.Build;
}
set
{
vendor_string = value;
}
}
static string vendor_string = null;
int select_blocksize(int samplerate, int time_ms)
{
@@ -2007,7 +2020,7 @@ namespace CUETools.Codecs.FLACCL
{
BitWriter bitwriter = new BitWriter(comment, pos, 4);
Encoding enc = new ASCIIEncoding();
int vendor_len = enc.GetBytes(vendor_string, 0, vendor_string.Length, comment, pos + 8);
int vendor_len = enc.GetBytes(Vendor, 0, Vendor.Length, comment, pos + 8);
// metadata header
bitwriter.writebits(1, last);