1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Add looping field and fix build

This commit is contained in:
iiSaLMaN 2019-08-15 05:35:47 +03:00
parent 07e7e1187c
commit cfa569b226

View File

@ -7,6 +7,7 @@ using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio; using osu.Framework.Audio;
using osu.Framework.Audio.Sample; using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Audio; using osu.Game.Audio;
@ -35,6 +36,8 @@ namespace osu.Game.Skinning
this.audio = audio; this.audio = audio;
} }
public bool Looping;
public void Play() => channels?.ForEach(c => c.Play()); public void Play() => channels?.ForEach(c => c.Play());
public void AddAdjustment(AdjustableProperty type, BindableDouble adjustBindable) => channels?.ForEach(c => c.AddAdjustment(type, adjustBindable)); public void AddAdjustment(AdjustableProperty type, BindableDouble adjustBindable) => channels?.ForEach(c => c.AddAdjustment(type, adjustBindable));
@ -60,6 +63,7 @@ namespace osu.Game.Skinning
if (ch == null) if (ch == null)
continue; continue;
ch.Looping = Looping;
ch.Volume.Value = info.Volume / 100.0; ch.Volume.Value = info.Volume / 100.0;
return ch; return ch;
} }