-
Notifications
You must be signed in to change notification settings - Fork 309
/
IRenderer.cs
49 lines (42 loc) · 1.48 KB
/
IRenderer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Threading;
using System.Threading.Tasks;
using OpenUtau.Core.Ustx;
namespace OpenUtau.Core.Render {
public class NoResamplerException : Exception { }
public class NoWavtoolException : Exception { }
/// <summary>
/// Render result of a phrase.
/// </summary>
public class RenderResult {
public float[] samples;
/// <summary>
/// The length of leading samples.
/// </summary>
public double leadingMs;
/// <summary>
/// Start position of non-leading samples.
/// </summary>
public double positionMs;
/// <summary>
/// Length estimated before actual render.
/// </summary>
public double estimatedLengthMs;
}
public class RenderPitchResult {
public float[] ticks;
public float[] tones;
}
/// <summary>
/// Interface of phrase-based renderer.
/// </summary>
public interface IRenderer {
USingerType SingerType { get; }
bool SupportsRenderPitch { get; }
bool SupportsExpression(UExpressionDescriptor descriptor);
RenderResult Layout(RenderPhrase phrase);
Task<RenderResult> Render(RenderPhrase phrase, Progress progress, int trackNo, CancellationTokenSource cancellation, bool isPreRender = false);
RenderPitchResult LoadRenderedPitch(RenderPhrase phrase);
UExpressionDescriptor[] GetSuggestedExpressions(USinger singer, URenderSettings renderSettings);
}
}