mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Initial sample + samplechannel rework
This commit is contained in:
@ -25,7 +25,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// </summary>
|
||||
private const int max_decimal_digits = 5;
|
||||
|
||||
private SampleChannel sample;
|
||||
private Sample sample;
|
||||
private double lastSampleTime;
|
||||
private T lastSampleValue;
|
||||
|
||||
@ -157,14 +157,14 @@ namespace osu.Game.Graphics.UserInterface
|
||||
lastSampleValue = value;
|
||||
|
||||
lastSampleTime = Clock.CurrentTime;
|
||||
sample.Frequency.Value = 1 + NormalizedValue * 0.2f;
|
||||
|
||||
var channel = sample.Play();
|
||||
|
||||
channel.Frequency.Value = 1 + NormalizedValue * 0.2f;
|
||||
if (NormalizedValue == 0)
|
||||
sample.Frequency.Value -= 0.4f;
|
||||
channel.Frequency.Value -= 0.4f;
|
||||
else if (NormalizedValue == 1)
|
||||
sample.Frequency.Value += 0.4f;
|
||||
|
||||
sample.Play();
|
||||
channel.Frequency.Value += 0.4f;
|
||||
}
|
||||
|
||||
private void updateTooltipText(T value)
|
||||
|
Reference in New Issue
Block a user