2017-05-23 05:11:37 +00:00
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
2017-12-23 07:46:02 +00:00
|
|
|
using osu.Game.Audio;
|
|
|
|
|
2017-05-23 04:55:18 +00:00
|
|
|
namespace osu.Game.Beatmaps.ControlPoints
|
|
|
|
{
|
2017-12-23 07:31:45 +00:00
|
|
|
public class SampleControlPoint : ControlPoint
|
2017-05-23 04:55:18 +00:00
|
|
|
{
|
2017-12-21 07:02:33 +00:00
|
|
|
public const string DEFAULT_BANK = "normal";
|
|
|
|
|
2017-05-23 05:11:37 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The default sample bank at this control point.
|
|
|
|
/// </summary>
|
2017-12-21 07:02:33 +00:00
|
|
|
public string SampleBank = DEFAULT_BANK;
|
2017-05-23 05:11:37 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The default sample volume at this control point.
|
|
|
|
/// </summary>
|
2017-12-26 10:32:20 +00:00
|
|
|
public int SampleVolume = 100;
|
2017-12-23 07:46:02 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Create a SampleInfo based on the sample settings in this control point.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="sampleName">The name of the same.</param>
|
|
|
|
/// <returns>A populated <see cref="SampleInfo"/>.</returns>
|
|
|
|
public SampleInfo GetSampleInfo(string sampleName = SampleInfo.HIT_NORMAL) => new SampleInfo
|
|
|
|
{
|
|
|
|
Bank = SampleBank,
|
|
|
|
Name = sampleName,
|
|
|
|
Volume = SampleVolume,
|
|
|
|
};
|
2017-05-23 04:55:18 +00:00
|
|
|
}
|
2017-12-21 07:02:33 +00:00
|
|
|
}
|