mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09:00
36 lines
841 B
C#
36 lines
841 B
C#
using osu.Framework.Allocation;
|
|
using osu.Framework.Audio;
|
|
using osu.Framework.Audio.Track;
|
|
using osu.Framework.Graphics;
|
|
using osu.Game.Beatmaps;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace osu.Game.Audio
|
|
{
|
|
public class AudioLoadWrapper : Drawable
|
|
{
|
|
private readonly string preview;
|
|
|
|
public Track Preview;
|
|
|
|
public AudioLoadWrapper(string preview)
|
|
{
|
|
this.preview = preview;
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(AudioManager audio)
|
|
{
|
|
if (!string.IsNullOrEmpty(preview))
|
|
{
|
|
Preview = audio.Track.Get(preview);
|
|
Preview.Volume.Value = 0.5;
|
|
}
|
|
}
|
|
}
|
|
}
|