mirror of https://github.com/ppy/osu
Add looping field and fix build
This commit is contained in:
parent
07e7e1187c
commit
cfa569b226
|
@ -7,6 +7,7 @@
|
|||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Game.Audio;
|
||||
|
||||
|
@ -35,6 +36,8 @@ private void load(AudioManager audio)
|
|||
this.audio = audio;
|
||||
}
|
||||
|
||||
public bool Looping;
|
||||
|
||||
public void Play() => channels?.ForEach(c => c.Play());
|
||||
|
||||
public void AddAdjustment(AdjustableProperty type, BindableDouble adjustBindable) => channels?.ForEach(c => c.AddAdjustment(type, adjustBindable));
|
||||
|
@ -60,6 +63,7 @@ private SampleChannel loadChannel(ISampleInfo info, Func<string, SampleChannel>
|
|||
if (ch == null)
|
||||
continue;
|
||||
|
||||
ch.Looping = Looping;
|
||||
ch.Volume.Value = info.Volume / 100.0;
|
||||
return ch;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue