Skip to content

Commit

Permalink
Merge pull request #909 from maiko3tattun/1027_FixRenderingTrackNo
Browse files Browse the repository at this point in the history
Fix rendering track No.
  • Loading branch information
stakira authored Nov 14, 2023
2 parents 171960d + 80b8477 commit 1c2238f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions OpenUtau.Core/Classic/ClassicRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Task<RenderResult> RenderInternal(RenderPhrase phrase, Progress progress,
VoicebankFiles.Inst.CopyBackMetaFiles(item.inputFile, item.inputTemp);
}
}
progress.Complete(1, $"Track {trackNo}: {item.resampler} \"{item.phone.phoneme}\"");
progress.Complete(1, $"Track {trackNo + 1}: {item.resampler} \"{item.phone.phoneme}\"");
});
var result = Layout(phrase);
var wavtool = new SharpWavtool(true);
Expand All @@ -97,7 +97,7 @@ public Task<RenderResult> RenderExternal(RenderPhrase phrase, Progress progress,
resamplerItems.Add(new ResamplerItem(phrase, phone));
}
var task = Task.Run(() => {
string progressInfo = $"Track {trackNo} : {phrase.wavtool} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
string progressInfo = $"Track {trackNo + 1} : {phrase.wavtool} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
progress.Complete(0, progressInfo);
var wavPath = Path.Join(PathManager.Inst.CachePath, $"cat-{phrase.hash:x16}.wav");
var result = Layout(phrase);
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Core/Classic/WorldlineRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Task<RenderResult> Render(RenderPhrase phrase, Progress progress, int tra
var task = Task.Run(() => {
var result = Layout(phrase);
var wavPath = Path.Join(PathManager.Inst.CachePath, $"wdl-{phrase.hash:x16}.wav");
string progressInfo = $"Track {trackNo}: {this} {string.Join(" ", phrase.phones.Select(p => p.phoneme))}";
string progressInfo = $"Track {trackNo + 1}: {this} {string.Join(" ", phrase.phones.Select(p => p.phoneme))}";
progress.Complete(0, progressInfo);
if (File.Exists(wavPath)) {
try {
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Task<RenderResult> Render(RenderPhrase phrase, Progress progress, int tra
? $"ds-{phrase.hash:x16}-depth{depth}-{speedup}x.wav" // if the depth changes, phrase should be re-rendered
: $"ds-{phrase.hash:x16}-{speedup}x.wav"; // preserve this for not invalidating cache from older versions
var wavPath = Path.Join(PathManager.Inst.CachePath, wavName);
string progressInfo = $"{this}{speedup}x \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
string progressInfo = $"Track {trackNo + 1}: {this}{speedup}x \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
if (File.Exists(wavPath)) {
try {
using (var waveStream = Wave.OpenFile(wavPath)) {
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Core/Enunu/EnunuRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Task<RenderResult> Render(RenderPhrase phrase, Progress progress, int tra
if (cancellation.IsCancellationRequested) {
return new RenderResult();
}
string progressInfo = $"Track {trackNo}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
string progressInfo = $"Track {trackNo + 1}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
progress.Complete(0, progressInfo);
var tmpPath = Path.Join(PathManager.Inst.CachePath, $"enu-{phrase.preEffectHash:x16}");
var ustPath = tmpPath + ".tmp";
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Core/Vogen/VogenRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Task<RenderResult> Render(RenderPhrase phrase, Progress progress, int tra
}
var result = Layout(phrase);
var wavPath = Path.Join(PathManager.Inst.CachePath, $"vog-{phrase.hash:x16}.wav");
string progressInfo = $"Track {trackNo}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
string progressInfo = $"Track {trackNo + 1}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\"";
progress.Complete(0, progressInfo);
if (File.Exists(wavPath)) {
try {
Expand Down

0 comments on commit 1c2238f

Please sign in to comment.