mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Cleanups
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
@ -38,18 +39,23 @@ namespace osu.Game.Skinning
|
||||
[Resolved(CanBeNull = true)]
|
||||
private IPooledSampleProvider pooledProvider { get; set; }
|
||||
|
||||
public SkinnableSound(ISampleInfo sample)
|
||||
: this(new[] { sample })
|
||||
public SkinnableSound()
|
||||
{
|
||||
}
|
||||
|
||||
public SkinnableSound(IEnumerable<ISampleInfo> samples)
|
||||
public SkinnableSound([NotNull] IEnumerable<ISampleInfo> samples)
|
||||
: this()
|
||||
{
|
||||
this.samples = samples.ToArray();
|
||||
|
||||
InternalChild = SamplesContainer = new AudioContainer<PoolableSkinnableSample>();
|
||||
}
|
||||
|
||||
public SkinnableSound([NotNull] ISampleInfo sample)
|
||||
: this(new[] { sample })
|
||||
{
|
||||
}
|
||||
|
||||
private ISampleInfo[] samples;
|
||||
|
||||
public ISampleInfo[] Samples
|
||||
@ -57,8 +63,7 @@ namespace osu.Game.Skinning
|
||||
get => samples;
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException(nameof(value));
|
||||
value ??= Array.Empty<ISampleInfo>();
|
||||
|
||||
if (samples == value)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user