2017-04-06 02:41:16 +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-06 18:40:43 +00:00
|
|
|
|
using System;
|
2017-12-07 22:09:51 +00:00
|
|
|
|
using osu.Framework.Audio.Sample;
|
|
|
|
|
|
2017-04-06 02:41:16 +00:00
|
|
|
|
namespace osu.Game.Audio
|
|
|
|
|
{
|
2017-12-06 18:40:43 +00:00
|
|
|
|
[Serializable]
|
2017-04-06 02:41:16 +00:00
|
|
|
|
public class SampleInfo
|
|
|
|
|
{
|
2017-04-06 03:14:06 +00:00
|
|
|
|
public const string HIT_WHISTLE = @"hitwhistle";
|
|
|
|
|
public const string HIT_FINISH = @"hitfinish";
|
|
|
|
|
public const string HIT_NORMAL = @"hitnormal";
|
|
|
|
|
public const string HIT_CLAP = @"hitclap";
|
|
|
|
|
|
2017-12-07 22:09:51 +00:00
|
|
|
|
public SampleChannel GetChannel(SampleManager manager)
|
|
|
|
|
{
|
2017-12-08 08:41:13 +00:00
|
|
|
|
var channel = manager.Get($"Gameplay/{Bank}-{Name}");
|
2017-12-23 08:20:14 +00:00
|
|
|
|
channel.Volume.Value = Volume / 100.0;
|
2017-12-07 22:09:51 +00:00
|
|
|
|
return channel;
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-06 02:41:16 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The bank to load the sample from.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Bank;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of the sample to load.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The sample volume.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Volume;
|
|
|
|
|
}
|
|
|
|
|
}
|