Merge branch 'editor-waveform' into editor-waveform-timeline

This commit is contained in:
smoogipoo 2017-10-04 21:58:25 +09:00
commit dcd5cc6753
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public float Resolution
get { return resolution; }
set
{
if (value < 0 || value > 1)
if (value < 0)
throw new ArgumentOutOfRangeException(nameof(value));
if (resolution == value)
@ -90,7 +90,7 @@ protected override void ApplyDrawNode(DrawNode node)
n.Texture = texture;
n.Size = DrawSize;
n.Shared = sharedData;
n.Points = waveform?.Generate((int)(MathHelper.Clamp(Math.Ceiling(DrawWidth), 0, waveform.MaximumPoints) * resolution));
n.Points = waveform?.Generate((int)(MathHelper.Clamp(Math.Ceiling(DrawWidth) * Resolution, 0, waveform.MaximumPoints)));
n.Channels = waveform?.Channels ?? 0;
base.ApplyDrawNode(node);