1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 18:27:26 +08:00

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

This commit is contained in:
smoogipoo 2017-10-04 21:58:25 +09:00
commit dcd5cc6753

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose
get { return resolution; }
set
{
if (value < 0 || value > 1)
if (value < 0)
throw new ArgumentOutOfRangeException(nameof(value));
if (resolution == value)
@ -90,7 +90,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose
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);