mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
1) Fixed crash on source files that contain zero length tags
2) Fixed a glitch in filename corrector - it sometimes didn't replace underscores with spaces. 3) Fixed a bug when a broken cue sheet was created if artist, title or genre contained comma character. 3) Added .zip archive support 4) Added support for cue sheets which start with data track (mixed mode or "playstation type" cds)
This commit is contained in:
@@ -53,6 +53,8 @@ namespace LossyWAVSharp
|
||||
double quality = 5.0;
|
||||
bool createCorrection = false;
|
||||
bool toStdout = false;
|
||||
int outputBPS = 0;
|
||||
|
||||
for (int arg = 1; arg < args.Length; arg++)
|
||||
{
|
||||
bool ok = true;
|
||||
@@ -66,6 +68,8 @@ namespace LossyWAVSharp
|
||||
quality = 2.5;
|
||||
else if (args[arg] == "-C" || args[arg] == "--correction")
|
||||
createCorrection = true;
|
||||
else if (args[arg] == "--16")
|
||||
outputBPS = 16;
|
||||
else if ((args[arg] == "-N" || args[arg] == "--stdinname") && ++arg < args.Length)
|
||||
stdinName = args[arg];
|
||||
else if ((args[arg] == "-q" || args[arg] == "--quality") && ++arg < args.Length)
|
||||
@@ -88,7 +92,7 @@ namespace LossyWAVSharp
|
||||
{
|
||||
WAVReader audioSource = new WAVReader(sourceFile, (sourceFile == "-" ? Console.OpenStandardInput() : null));
|
||||
if (sourceFile == "-" && stdinName != null) sourceFile = stdinName;
|
||||
WAVWriter audioDest = new WAVWriter(Path.ChangeExtension(sourceFile, ".lossy.wav"), audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, toStdout ? Console.OpenStandardOutput() : null);
|
||||
WAVWriter audioDest = new WAVWriter(Path.ChangeExtension(sourceFile, ".lossy.wav"), outputBPS == 0 ? audioSource.BitsPerSample : outputBPS, audioSource.ChannelCount, audioSource.SampleRate, toStdout ? Console.OpenStandardOutput() : null);
|
||||
WAVWriter lwcdfDest = createCorrection ? new WAVWriter(Path.ChangeExtension(sourceFile, ".lwcdf.wav"), audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, null) : null;
|
||||
LossyWAVWriter lossyWAV = new LossyWAVWriter(audioDest, lwcdfDest, audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, quality);
|
||||
int[,] buff = new int[0x1000, audioSource.ChannelCount];
|
||||
|
||||
Reference in New Issue
Block a user