Skip to content

Commit

Permalink
Fix for misordering of FM VGM packs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-zhao committed Oct 14, 2024
1 parent 9ba8d73 commit cd33036
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SidWizPlus/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ private static void Run(Settings settings)
throw new Exception($"Failed to match {inputFile}");
}

inputs.AddRange(files.OrderByAlphaNumeric(x => x));
inputs.AddRange(files);
}

settings.InputFiles = inputs;
Expand Down Expand Up @@ -374,7 +374,7 @@ private static void Run(Settings settings)
return channel;
})
.Where(ch => ch.SampleCount > 0 && !ch.IsSilent)
.OrderBy(ch => ch.Filename)
.OrderByAlphaNumeric(ch => ch.Filename)
.ToList();

if (settings.AutoScalePercentage > 0)
Expand Down Expand Up @@ -649,7 +649,6 @@ private static void RunMultiDumper(Settings settings)
settings.InputFiles = Directory.EnumerateFiles(
Path.GetDirectoryName(settings.VgmFile) ?? throw new Exception($"Can't get path from VGM \"{settings.VgmFile}\""),
Path.GetFileNameWithoutExtension(settings.VgmFile) + " - *.wav")
.OrderByAlphaNumeric(s => s)
.ToList();
if (!settings.InputFiles.Any())
{
Expand All @@ -663,7 +662,7 @@ private static void RunMultiDumper(Settings settings)
settings.MultidumperGapMs);
var song = wrapper.GetSongs(settings.VgmFile).First();
var filenames = wrapper.Dump(song, d => Console.Write($"\r{d:P0}"));
settings.InputFiles = filenames.OrderByAlphaNumeric(s => s);
settings.InputFiles = filenames.ToList();
Console.WriteLine($" done. {settings.InputFiles.Count()} files found.");
}
else
Expand Down

0 comments on commit cd33036

Please sign in to comment.